diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2014-09-04 14:24:03 +0400 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2014-09-04 14:24:03 +0400 |
commit | 4eb1e425fec4cf0eecd3fd33dc838f9332af5e44 (patch) | |
tree | 3c557bef4d68f97ead613275e0d376081b0a25f7 /networking | |
parent | 67e01fecce5547a3d3d5695f52b375d224014b54 (diff) |
tftpd: tweak HP PA-RISC firmware bug compatibility
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r-- | networking/tftp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/networking/tftp.c b/networking/tftp.c index 8e3b0a2dc..7c0ee58d7 100644 --- a/networking/tftp.c +++ b/networking/tftp.c @@ -117,8 +117,9 @@ struct globals { /* u16 TFTP_ERROR; u16 reason; both network-endian, then error text: */ uint8_t error_pkt[4 + 32]; struct passwd *pw; - /* used in tftpd_main(), a bit big for stack: */ - char block_buf[TFTP_BLKSIZE_DEFAULT]; + /* Used in tftpd_main() for initial packet */ + /* Some HP PA-RISC firmware always sends fixed 516-byte requests */ + char block_buf[516]; char block_buf_tail[1]; #if ENABLE_FEATURE_TFTP_PROGRESS_BAR off_t pos; @@ -811,7 +812,7 @@ int tftpd_main(int argc UNUSED_PARAM, char **argv) ) { goto err; } - /* Some HP PA-RISC firmware always sends fixed 512-byte requests, + /* Some HP PA-RISC firmware always sends fixed 516-byte requests, * with trailing garbage. * Support that by not requiring NUL to be the last byte (see above). * To make strXYZ() ops safe, force NUL termination: |