libs/lmo: fix possible null pointer dereference in lmo_lookup() - thanks blogic
This commit is contained in:
parent
47dc4ded76
commit
68f335b8d6
1 changed files with 5 additions and 1 deletions
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue