X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Foptions.c;h=f1d2dc9ddf36947df03d864c47241a6bb34def32;hb=8d7970b8f3db727fe798b65f3377fe6787575426;hp=6e38d43ee900b20a4d5069d4ff8c877dfb930c3f;hpb=d34159f417620eb7c481bf53f29fe04c86ccd223;p=ppp.git diff --git a/pppd/options.c b/pppd/options.c index 6e38d43..f1d2dc9 100644 --- a/pppd/options.c +++ b/pppd/options.c @@ -79,7 +79,6 @@ char *strdup __P((char *)); #endif -static const char rcsid[] = RCSID; struct option_value { struct option_value *next; @@ -992,7 +991,7 @@ print_option(opt, mainopt, printer, arg) p = (char *) opt->addr2; if ((opt->flags & OPT_STATIC) == 0) p = *(char **)p; - printer("%q", p); + printer(arg, "%q", p); } else if (opt->flags & OPT_A2LIST) { struct option_value *ovp; @@ -1358,6 +1357,7 @@ getword(f, word, newlinep, filename) c = getc(f); } + word[MAXWORDLEN-1] = 0; /* make sure word is null-terminated */ /* * End of the word: check for errors. @@ -1753,7 +1753,7 @@ user_unsetenv(argv) option_error("unexpected = in name: %s", arg); return 0; } - if (arg == '\0') { + if (*arg == '\0') { option_error("missing variable name for unset"); return 0; }