git.samba.org
/
metze
/
wireshark
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
532247b
)
Check arguments to prefs_find_preference().
author
Stig Bjørlykke
<stig@bjorlykke.org>
Sun, 14 Aug 2011 20:31:16 +0000
(20:31 -0000)
committer
Stig Bjørlykke
<stig@bjorlykke.org>
Sun, 14 Aug 2011 20:31:16 +0000
(20:31 -0000)
Fix CID 1259.
svn path=/trunk/; revision=38540
epan/prefs.c
patch
|
blob
|
history
diff --git
a/epan/prefs.c
b/epan/prefs.c
index 9ccf49c7c23ec1089c91db9baf5d48a31d34870c..c29082c2b5868152db17f15bbf4ae5503ce05898 100644
(file)
--- a/
epan/prefs.c
+++ b/
epan/prefs.c
@@
-640,11
+640,15
@@
prefs_find_preference(module_t *module, const char *name)
{
GList *list_entry;
+ if (module == NULL)
+ return NULL; /* invalid parameters */
+
list_entry = g_list_find_custom(module->prefs, name,
preference_match);
if (list_entry == NULL)
return NULL; /* no such preference */
+
return (struct preference *) list_entry->data;
}