From 45dfa5f4c8744b8cad8fbcf132c8d1c29f14daf1 Mon Sep 17 00:00:00 2001 From: Kacper Wysocki Date: Sat, 19 Mar 2011 03:53:12 +0100 Subject: [PATCH] bugfix: what happens if the mac db didnt load yet? --- src/mac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mac.c b/src/mac.c index e69f9e0..f883e05 100644 --- a/src/mac.c +++ b/src/mac.c @@ -100,6 +100,7 @@ mac_entry *match_mac(mac_entry **db, const uint8_t mac[], uint8_t mask) print_mac(mac); printf("/%d match\n", mask); } */ + if(db == NULL) return NULL; // database not loaded! if(mask == 0) @@ -172,7 +173,7 @@ int load_mac(const char *file, mac_entry **sigp[], int hashsize) mac_entry **sig; // output uint32_t ln = 0; uint32_t sigcnt = 0; - debug("opening %s\n", file); + //debug("opening %s\n", file); FILE *f = fopen(file, "r"); char buf[MAXLINE]; char *p; -- 2.11.4.GIT