aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2014-09-04 12:24:03 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2014-09-04 12:24:03 +0200
commit4eb1e425fec4cf0eecd3fd33dc838f9332af5e44 (patch)
tree3c557bef4d68f97ead613275e0d376081b0a25f7
parent67e01fecce5547a3d3d5695f52b375d224014b54 (diff)
downloadbusybox-w32-4eb1e425fec4cf0eecd3fd33dc838f9332af5e44.tar.gz
busybox-w32-4eb1e425fec4cf0eecd3fd33dc838f9332af5e44.tar.bz2
busybox-w32-4eb1e425fec4cf0eecd3fd33dc838f9332af5e44.zip
tftpd: tweak HP PA-RISC firmware bug compatibility
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/tftp.c7
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 {
117 /* u16 TFTP_ERROR; u16 reason; both network-endian, then error text: */ 117 /* u16 TFTP_ERROR; u16 reason; both network-endian, then error text: */
118 uint8_t error_pkt[4 + 32]; 118 uint8_t error_pkt[4 + 32];
119 struct passwd *pw; 119 struct passwd *pw;
120 /* used in tftpd_main(), a bit big for stack: */ 120 /* Used in tftpd_main() for initial packet */
121 char block_buf[TFTP_BLKSIZE_DEFAULT]; 121 /* Some HP PA-RISC firmware always sends fixed 516-byte requests */
122 char block_buf[516];
122 char block_buf_tail[1]; 123 char block_buf_tail[1];
123#if ENABLE_FEATURE_TFTP_PROGRESS_BAR 124#if ENABLE_FEATURE_TFTP_PROGRESS_BAR
124 off_t pos; 125 off_t pos;
@@ -811,7 +812,7 @@ int tftpd_main(int argc UNUSED_PARAM, char **argv)
811 ) { 812 ) {
812 goto err; 813 goto err;
813 } 814 }
814 /* Some HP PA-RISC firmware always sends fixed 512-byte requests, 815 /* Some HP PA-RISC firmware always sends fixed 516-byte requests,
815 * with trailing garbage. 816 * with trailing garbage.
816 * Support that by not requiring NUL to be the last byte (see above). 817 * Support that by not requiring NUL to be the last byte (see above).
817 * To make strXYZ() ops safe, force NUL termination: 818 * To make strXYZ() ops safe, force NUL termination: