Skip to content

assertion failure in ReplaceImageInList #802

Closed
@bestshow

Description

@bestshow

Here is the critical code : (in MogrifyImageList)

            swap=CloneImage(p,0,0,MagickTrue,exception);                                
            ReplaceImageInList(&p,CloneImage(q,0,0,MagickTrue,exception));        //8794
            ReplaceImageInList(&q,swap);                  

CloneImage may return NULL (in line 8794),and in ReplaceImageInList:

MagickExport void ReplaceImageInList(Image **images,Image *replace)        //1144
{
  assert(images != (Image **) NULL);
  assert(replace != (Image *) NULL);        //1147

If the "replace" is NULL,it will may cause assertion failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions