From 4eb1e425fec4cf0eecd3fd33dc838f9332af5e44 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 4 Sep 2014 12:24:03 +0200 Subject: tftpd: tweak HP PA-RISC firmware bug compatibility Signed-off-by: Denys Vlasenko --- networking/tftp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'networking/tftp.c') 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: -- cgit v1.2.3