Closed
Description
Here is the critical code : (in WriteGIFImage)
global_colormap=(unsigned char *) AcquireQuantumMemory(768UL, //1560
sizeof(*global_colormap));
colormap=(unsigned char *) AcquireQuantumMemory(768UL,sizeof(*colormap));
if ((global_colormap == (unsigned char *) NULL) ||
(colormap == (unsigned char *) NULL))
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed"); //1565
AcquireQuantumMemory(…) may return NULL,if one of the “global_colormap” and ”colormap” is NULL,and the other is not,this may cause memory leak error in “If statement”.