X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Futils.c;h=12ae21aec54214dde3cd013eaf54956e36e0ebd9;hp=6cf80fe3d229a2fab28ec00dd4b9149e0e11279f;hb=d8e8d7a74b791743ad67e8bdba10508b0f901beb;hpb=356d8d558d844412119aa18c8e5a113bc6459c7b diff --git a/pppd/utils.c b/pppd/utils.c index 6cf80fe..12ae21a 100644 --- a/pppd/utils.c +++ b/pppd/utils.c @@ -59,7 +59,6 @@ #include "fsm.h" #include "lcp.h" -static const char rcsid[] = RCSID; #if defined(SUNOS4) extern char *strerror(); @@ -296,6 +295,8 @@ vslprintf(buf, buflen, fmt, args) case 'q': /* quoted string */ quoted = c == 'q'; p = va_arg(args, unsigned char *); + if (p == NULL) + p = (unsigned char *)""; if (fillch == '0' && prec >= 0) { n = prec; } else { @@ -623,7 +624,7 @@ print_string(p, len, printer, arg) printer(arg, "\\t"); break; default: - printer(arg, "\\%.3o", c); + printer(arg, "\\%.3o", (unsigned char) c); } } }