X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Foptions.c;h=aecb930249b636035ab6a47330dac4637f4bc865;hp=5db580a0e270c0628fb99d1400423599a1f0ce5e;hb=ae54fcfadeb52398804fa8900988bf86c0b91748;hpb=5c765a67fd25f9d84e71ed61ace37c8c97f6be15 diff --git a/pppd/options.c b/pppd/options.c index 5db580a..aecb930 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; @@ -802,6 +801,11 @@ process_option(opt, cmd, argv) free(*optptr); *optptr = sv; } + /* obfuscate original argument for things like password */ + if (opt->flags & OPT_HIDE) { + memset(*argv, '?', strlen(*argv)); + *argv = "********"; + } break; case o_special_noarg: @@ -1358,6 +1362,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.