Skip to content

Commit 3af9a95

Browse files
committed
Added extra check to make sure we don't read after an empty string.
1 parent 0d9f7c3 commit 3af9a95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coders/png.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8074,7 +8074,7 @@ Magick_png_write_raw_profile(const ImageInfo *image_info,png_struct *ping,
80748074
unsigned char
80758075
hex[16]={'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
80768076

8077-
if (length > 10)
8077+
if ((length > 10) && (*profile_type != '\0'))
80788078
{
80798079
if (LocaleNCompare((char *) profile_type+1, "ng-chunk-",9) == 0)
80808080
return;

0 commit comments

Comments
 (0)