Bug in ValidateEntities() in MagickCore/xml-tree.c
Posted: 2013-12-27T16:47:23-07:00
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?)
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?)