Nmap Development mailing list archives

[PATCH] Add return in mac_prefix_init() if fopen() fails


From: Kris Katterjohn <kjak () ispwest com>
Date: Mon, 21 Aug 2006 20:48:45 -0500

This adds a return in mac_prefix_init() in MACLookup.cc if we fail to
open the file because we can't continue without it being open.

It's a diff against 4.20ALPHA4.

Thanks,
Kris Katterjohn
--- x/MACLookup.cc      2006-03-05 18:00:03.000000000 -0600
+++ y/MACLookup.cc      2006-08-21 20:42:20.000000000 -0500
@@ -153,6 +153,7 @@ void mac_prefix_init() {
   fp = fopen(filename, "r");
   if (!fp) {
     error("Unable to open %s.  Ethernet vendor correlation will not be performed ", filename);
+    return;
   }
 
   while(fgets(line, sizeof(line), fp)) {

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

Current thread: