forked from len0rd/rockbox
dircache: Fix a NULL pointer dereference
if idx == 0, get_idx_dcvolp() will return NULL. Change-Id: I4eafa71bb1f77ef8c865570bf8f124cdd9326d3e
This commit is contained in:
parent
7dbfda6c55
commit
a5a19a3370
1 changed files with 2 additions and 1 deletions
|
@ -2612,7 +2612,8 @@ static dc_serial_t get_file_serialhash(const struct dircache_file *dcfilep)
|
||||||
idx = ce->up;
|
idx = ce->up;
|
||||||
}
|
}
|
||||||
|
|
||||||
h = dc_hash_serialnum(get_idx_dcvolp(idx)->serialnum, h);
|
if (idx < 0)
|
||||||
|
h = dc_hash_serialnum(get_idx_dcvolp(idx)->serialnum, h);
|
||||||
|
|
||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue