Browse files

Fixed segfault when unable to read pcap - Thanks to Joe Moore

  • Loading branch information...
1 parent d83cae3 commit 5bcbfc91fbae039934dd8717c757247244a8668a gamelinux committed May 2, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/passivedns.c
View
5 src/passivedns.c
@@ -1142,6 +1142,11 @@ int main(int argc, char *argv[])
}
+ if (config.handle == NULL) {
+ game_over();
+ return (1);
+ }
+
/** segfaults on empty pcap! */
if ((pcap_compile(config.handle, &config.cfilter, config.bpff, 1, config.net_mask)) == -1) {
olog("[*] Error pcap_compile user_filter: %s\n", pcap_geterr(config.handle));

0 comments on commit 5bcbfc9

Please sign in to comment.