git.samba.org
/
jlayton
/
wireshark.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
234d8ea
)
Don't assume we have an array of GeoIP databases.
author
Guy Harris
<guy@alum.mit.edu>
Sun, 19 Jun 2016 22:18:00 +0000
(15:18 -0700)
committer
Guy Harris
<guy@alum.mit.edu>
Sun, 19 Jun 2016 22:18:14 +0000
(22:18 +0000)
The attempt to open them might fail; if geoip_dat_arr is null, just
return 0 as the number of databases, don't crash.
Change-Id: I967d863d328a42d7dce79f58d4fa67d922d0cb2c
Reviewed-on: https://code.wireshark.org/review/16025
Reviewed-by: Guy Harris <guy@alum.mit.edu>
epan/geoip_db.c
patch
|
blob
|
history
diff --git
a/epan/geoip_db.c
b/epan/geoip_db.c
index 18bc7c076dbdb9fa903c3b5991c86b1fda9997c6..01b743bc26e364640eec4046fcc51b09ec5fa750 100644
(file)
--- a/
epan/geoip_db.c
+++ b/
epan/geoip_db.c
@@
-230,7
+230,7
@@
geoip_db_pref_init(module_t *nameres)
guint
geoip_db_num_dbs(void) {
- return geoip_dat_arr->len;
+ return
(geoip_dat_arr == NULL) ? 0 :
geoip_dat_arr->len;
}
const gchar *