tftpd.c (131358) | tftpd.c (133862) |
---|---|
1/* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37 The Regents of the University of California. All rights reserved.\n"; 38#endif /* not lint */ 39 40#ifndef lint 41#if 0 42static char sccsid[] = "@(#)tftpd.c 8.1 (Berkeley) 6/4/93"; 43#endif 44static const char rcsid[] = | 1/* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37 The Regents of the University of California. All rights reserved.\n"; 38#endif /* not lint */ 39 40#ifndef lint 41#if 0 42static char sccsid[] = "@(#)tftpd.c 8.1 (Berkeley) 6/4/93"; 43#endif 44static const char rcsid[] = |
45 "$FreeBSD: head/libexec/tftpd/tftpd.c 131358 2004-06-30 18:58:19Z csjp $"; | 45 "$FreeBSD: head/libexec/tftpd/tftpd.c 133862 2004-08-16 15:45:27Z marius $"; |
46#endif /* not lint */ 47 48/* 49 * Trivial file transfer protocol server. 50 * 51 * This version includes many modifications by Jim Guyton 52 * <guyton@rand-unix>. 53 */ --- 392 unchanged lines hidden (view full) --- 446 exit(1); 447 } 448 while (++cp < buf + size) { 449 for (i = 2, ccp = cp; i > 0; ccp++) { 450 if (ccp >= buf + size) { 451 /* 452 * Don't reject the request, just stop trying 453 * to parse the option and get on with it. | 46#endif /* not lint */ 47 48/* 49 * Trivial file transfer protocol server. 50 * 51 * This version includes many modifications by Jim Guyton 52 * <guyton@rand-unix>. 53 */ --- 392 unchanged lines hidden (view full) --- 446 exit(1); 447 } 448 while (++cp < buf + size) { 449 for (i = 2, ccp = cp; i > 0; ccp++) { 450 if (ccp >= buf + size) { 451 /* 452 * Don't reject the request, just stop trying 453 * to parse the option and get on with it. |
454 * Some Apple OpenFirmware versions have | 454 * Some Apple Open Firmware versions have |
455 * trailing garbage on the end of otherwise 456 * valid requests. 457 */ 458 goto option_fail; 459 } else if (*ccp == '\0') 460 i--; 461 } 462 for (option = cp; *cp; cp++) --- 471 unchanged lines hidden --- | 455 * trailing garbage on the end of otherwise 456 * valid requests. 457 */ 458 goto option_fail; 459 } else if (*ccp == '\0') 460 i--; 461 } 462 for (option = cp; *cp; cp++) --- 471 unchanged lines hidden --- |