X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Foptions.c;h=e08c1080e738fa3ee2059bf4c632210d4baf58d2;hb=6b014be066bd8ff051dbabab9e944a691c48a14e;hp=5e1489f495779d9e58a481f5177ecda66c9166b5;hpb=d8e8d7a74b791743ad67e8bdba10508b0f901beb;p=ppp.git diff --git a/pppd/options.c b/pppd/options.c index 5e1489f..e08c108 100644 --- a/pppd/options.c +++ b/pppd/options.c @@ -801,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: @@ -1088,7 +1093,7 @@ showversion(argv) char **argv; { if (phase == PHASE_INITIALIZE) { - fprintf(stderr, "pppd version %s\n", VERSION); + fprintf(stdout, "pppd version %s\n", VERSION); exit(0); } return 0; @@ -1357,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.