Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memory leak in ReadPCDImage #809

Closed
bestshow opened this issue Sep 30, 2017 · 2 comments
Closed

memory leak in ReadPCDImage #809

bestshow opened this issue Sep 30, 2017 · 2 comments
Labels

Comments

@bestshow
Copy link

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”.

@mikayla-grace
Copy link

Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ https://www.imagemagick.org/download/beta/ by sometime tomorrow.

@dlemstra dlemstra added the bug label Oct 1, 2017
@dlemstra dlemstra closed this as completed Oct 1, 2017
@nohmask
Copy link

nohmask commented Mar 28, 2018

This was assigned CVE-2017-18251.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants