18 Nov
2014
18 Nov
'14
2:03 a.m.
On 18/11/14 02:20, Andrew Gregory wrote:
On 11/18/14 at 12:51am, Allan McRae wrote:
A corrupt local db filelist could result in a realloc of size zero.
Maybe I'm missing something... Calling realloc with size zero should free the memory and return NULL, which seems like the right thing to do if there are no files.
You are correct. I thought a realloc(foo, 0) was undefined like malloc(0) is. I guess this is a false positive in the clang analyser. Allan