Check the debug stringbase when loading plugins, lest it be null and cause crashes down the line (bug 5478, r=dvander).

This commit is contained in:
Asher Baker 2012-09-08 17:31:31 +01:00
parent 6ff5733d7b
commit 7625ca439e

View File

@ -219,7 +219,11 @@ int BaseRuntime::CreateFromMemory(sp_file_hdr_t *hdr, uint8_t *base)
return SP_ERROR_FILE_FORMAT;
}
if ((plugin->flags & SP_FLAG_DEBUG) && (!(plugin->debug.files) || !(plugin->debug.lines) || !(plugin->debug.symbols)))
if ((plugin->flags & SP_FLAG_DEBUG) && (
!(plugin->debug.files) ||
!(plugin->debug.lines) ||
!(plugin->debug.symbols) ||
!(plugin->debug.stringbase) ))
{
return SP_ERROR_FILE_FORMAT;
}