diff options
author | Benno Rice <benno@FreeBSD.org> | 2001-11-22 05:08:35 +0000 |
---|---|---|
committer | Benno Rice <benno@FreeBSD.org> | 2001-11-22 05:08:35 +0000 |
commit | 14f0ab1c5360a99f9ad9fffe12f7d3c1e4fb2d1c (patch) | |
tree | cbb7850cfa3de1643b2ef72e860d1ffae516f8c0 /libexec/tftpd | |
parent | be2ac88c59ecd9c64240df8d72fcef339fe9aed4 (diff) | |
download | src-14f0ab1c5360a99f9ad9fffe12f7d3c1e4fb2d1c.tar.gz src-14f0ab1c5360a99f9ad9fffe12f7d3c1e4fb2d1c.zip |
Notes
Diffstat (limited to 'libexec/tftpd')
-rw-r--r-- | libexec/tftpd/tftpd.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libexec/tftpd/tftpd.c b/libexec/tftpd/tftpd.c index 8b32f24780e5..02837d121989 100644 --- a/libexec/tftpd/tftpd.c +++ b/libexec/tftpd/tftpd.c @@ -371,8 +371,14 @@ again: while (++cp < buf + size) { for (i = 2, ccp = cp; i > 0; ccp++) { if (ccp >= buf + size) { - nak(EBADOP); - exit(1); + /* + * Don't reject the request, just stop trying + * to parse the option and get on with it. + * Some Apple OpenFirmware versions have + * trailing garbage on the end of otherwise + * valid requests. + */ + goto option_fail; } else if (*ccp == '\0') i--; } @@ -387,6 +393,7 @@ again: cp = ccp-1; } +option_fail: if (options[OPT_TIMEOUT].o_request) { int to = atoi(options[OPT_TIMEOUT].o_request); if (to < 1 || to > 255) { |