Closed
Description
Here is the critical code : (in ReadPCDImage)
chroma1=(unsigned char *) AcquireQuantumMemory(image->columns+1UL,image->rows* //600
10*sizeof(*chroma1));
chroma2=(unsigned char *) AcquireQuantumMemory(image->columns+1UL,image->rows*
10*sizeof(*chroma2));
luma=(unsigned char *) AcquireQuantumMemory(image->columns+1UL,image->rows*
10*sizeof(*luma));
if ((chroma1 == (unsigned char *) NULL) || //606
(chroma2 == (unsigned char *) NULL) || (luma == (unsigned char *) NULL))
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
AcquireQuantumMemory(…) may return NULL,if one of the “chroma1” 、“chroma2” and ”luma” is NULL at least,and the other is not,this may cause memory leak error in “If statement”.