[tftp] Guard against invalid data block numbers
authorMichael Brown <mcb30@etherboot.org>
Sun, 1 Feb 2009 13:07:17 +0000 (13:07 +0000)
committerMichael Brown <mcb30@etherboot.org>
Sun, 1 Feb 2009 13:07:17 +0000 (13:07 +0000)
commit6711ce18a7fa134eb1322adb1d547a5ad02f86cf
tree8abb6d1eb5d7d7ebf9d9d2168000bcd5b8a9b41b
parente65afc4b10552ec9ac7de2f0d924b96bc71aaad0
[tftp] Guard against invalid data block numbers

A TFTP DATA packet with a block number of zero (representing a
negative offset within the file) could potentially cause problems.
Fixed by explicitly rejecting such packets.

Identified by Stefan Hajnoczi <stefanha@gmail.com>.
src/net/udp/tftp.c