The code of GetConfigureBlob is here:
MagickExport void *GetConfigureBlob(const char *filename,char *path,
size_t *length,ExceptionInfo *exception)
{
...
path_map=MagickMapAllocateMap(MagickMapCopyString,MagickMapDeallocateString); //line 1716, allocate memory for path_map
...
AddConfigurePath(path_map,&path_index,MagickShareConfigPath,exception); //line 1762, pass path_map to AddConfigurePath(...)
...
}
The code of AddConfigurePath is here:
static void AddConfigurePath(MagickMap path_map, unsigned int *path_index,
const char *path,ExceptionInfo *exception)
{
char
key[MaxTextExtent];
FormatString(key,"%u",*path_index);
(void) MagickMapAddEntry(path_map,key,(void *)path,0,exception);//line 1685, pass path_map to MagickMapAddEntry(...)
(*path_index)++;
}
The code of MagickMapAddEntry is here:
MagickExport unsigned int
MagickMapAddEntry(MagickMap map,const char *key, const void *object,
const size_t object_size, ExceptionInfo *exception)
{
MagickMapObject
*new_object;
assert(map != 0); //line 326, trigger assert failure because GetConfigureBlob() not perform null pointer checking but the memory allocation maybe faile
assert(map->signature == MagickSignature);
assert(key != 0);
assert(object != 0);
...
}
Diff:
Diff:
This problem is fixed by Mercurial changeset 15178:b27009bfd64e. Thanks for the report!