Page 1 of 1

Bug in ValidateEntities() in MagickCore/xml-tree.c

Posted: 2013-12-27T16:47:23-07:00
by thakis
Hi,

in MagickCore/xml-tree.c, function ValidateEntities contains this code:

while ((entities != (char *) NULL) &&
(strncmp(entities,xml+1,strlen(entities) == 0)))

Note that the parenthesis for the strncmp is wrong: it is `strncmp(a, b, strlen() == 0)` but should be `strncmp(a, b, strlen()) == 0`.

This was found by clang's new -Wmemsize-comparison warning.

(Is this the right place to report bugs?)

Re: Bug in ValidateEntities() in MagickCore/xml-tree.c

Posted: 2013-12-27T17:52:49-07:00
by thakis
I also reported this through the "contact developers" form, and received this reply:

"""We can reproduce the problem you posted and have a patch in ImageMagick 6.8.8-1 Beta, available by sometime tomorrow. Thanks."""