the-tcpdump-group / libpcap

the LIBpcap interface to various kernel packet capture mechanism
https://www.tcpdump.org/
Other
2.72k stars 854 forks source link

NULL dereference #767

Closed Bugcheckers closed 6 years ago

Bugcheckers commented 6 years ago

It seems if strchr returns NULL here, it can lead to a NULL dereference:

https://github.com/the-tcpdump-group/libpcap/blob/master/rpcapd/fileconf.c#L80

ptr = strchr(ptr, '=') + 1;

Thanks!

guyharris commented 6 years ago

The configuration file reader code was a bit sloppy; I rewrote it. That should eliminate this (and other) issues.