From: Vegard Nossum Date: Wed, 13 Jun 2018 10:38:53 +0000 (+0200) Subject: pppd: Fix printing call in print_option() X-Git-Tag: ppp-2.4.8~36 X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=3b409a8e299446e3118743ff2508c54330011eeb;p=ppp.git pppd: Fix printing call in print_option() print_option() was in this case passing p/opt->addr2 as the format string instead of the string to be printed (as a quoted string). That could lead to a nasty crash. Signed-off-by: Vegard Nossum Signed-off-by: Paul Mackerras --- diff --git a/pppd/options.c b/pppd/options.c index 6e38d43..482dce6 100644 --- a/pppd/options.c +++ b/pppd/options.c @@ -992,7 +992,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;