tftpd: tweak HP PA-RISC firmware bug compatibility
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
67e01fecce
commit
4eb1e425fe
@ -117,8 +117,9 @@ struct globals {
|
|||||||
/* u16 TFTP_ERROR; u16 reason; both network-endian, then error text: */
|
/* u16 TFTP_ERROR; u16 reason; both network-endian, then error text: */
|
||||||
uint8_t error_pkt[4 + 32];
|
uint8_t error_pkt[4 + 32];
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
/* used in tftpd_main(), a bit big for stack: */
|
/* Used in tftpd_main() for initial packet */
|
||||||
char block_buf[TFTP_BLKSIZE_DEFAULT];
|
/* Some HP PA-RISC firmware always sends fixed 516-byte requests */
|
||||||
|
char block_buf[516];
|
||||||
char block_buf_tail[1];
|
char block_buf_tail[1];
|
||||||
#if ENABLE_FEATURE_TFTP_PROGRESS_BAR
|
#if ENABLE_FEATURE_TFTP_PROGRESS_BAR
|
||||||
off_t pos;
|
off_t pos;
|
||||||
@ -811,7 +812,7 @@ int tftpd_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
) {
|
) {
|
||||||
goto err;
|
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.
|
* with trailing garbage.
|
||||||
* Support that by not requiring NUL to be the last byte (see above).
|
* Support that by not requiring NUL to be the last byte (see above).
|
||||||
* To make strXYZ() ops safe, force NUL termination:
|
* To make strXYZ() ops safe, force NUL termination:
|
||||||
|
Loading…
Reference in New Issue
Block a user