projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47dc4de
)
libs/lmo: fix possible null pointer dereference in lmo_lookup() - thanks blogic
author
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 19 Aug 2009 21:36:10 +0000
(21:36 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 19 Aug 2009 21:36:10 +0000
(21:36 +0000)
libs/lmo/src/lmo_core.c
patch
|
blob
|
history
diff --git
a/libs/lmo/src/lmo_core.c
b/libs/lmo/src/lmo_core.c
index 17467f21e6e3f4597225d253c53e9dbf1930ee4f..ab2410f462e76bd0a89ebc484c3153b2446761c5 100644
(file)
--- a/
libs/lmo/src/lmo_core.c
+++ b/
libs/lmo/src/lmo_core.c
@@
-207,8
+207,12
@@
int lmo_lookup(lmo_archive_t *ar, const char *key, char *dest, int len)
{
uint32_t look_key = sfh_hash(key, strlen(key));
int copy_len = -1;
+ lmo_entry_t *entry;
- lmo_entry_t *entry = ar->index;
+ if( !ar )
+ return copy_len;
+
+ entry = ar->index;
while( entry != NULL )
{