mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-06 09:56:38 +00:00
PPP, from PPPD upstream, Don't crash if NULL pointer passed to vslprintf for %q or %v
pppd: Don't crash if NULL pointer passed to vslprintf for %q or %v This is to avoid crashes like that reported in https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/1244714
This commit is contained in:
parent
f6d56e2937
commit
c31b03327f
@ -283,6 +283,8 @@ int ppp_vslprintf(char *buf, int buflen, char *fmt, va_list args) {
|
||||
case 'q': /* quoted string */
|
||||
quoted = c == 'q';
|
||||
p = va_arg(args, unsigned char *);
|
||||
if (p == NULL)
|
||||
p = (unsigned char *)"<NULL>";
|
||||
if (fillch == '0' && prec >= 0) {
|
||||
n = prec;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user