diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2003-10-12 00:27:55 +0000 |
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2003-10-12 00:27:55 +0000 |
| commit | 7f3a5689e7c0e22cdbd8fa1fd94431b5bda4fb0a (patch) | |
| tree | f2a1012b46d0b24f3dc9ce1ca7a9cb77fa547675 /usr.bin | |
| parent | 63d707097e491b99ed55feca319f1c4bd8598664 (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/tftp/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index d4fc7c85ff3c..08a7f1355dcd 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -85,7 +85,8 @@ int connected; char mode[32]; char line[MAXLINE]; int margc; -char *margv[20]; +#define MAX_MARGV 20 +char *margv[MAX_MARGV]; jmp_buf toplevel; volatile int txrx_error; @@ -719,7 +720,7 @@ makeargv() margc = 0; if ((cp = strchr(line, '\n'))) *cp = '\0'; - for (cp = line; *cp;) { + for (cp = line; margc < MAX_MARGV - 1 && *cp;) { while (isspace(*cp)) cp++; if (*cp == '\0') |
