From 782ed2f9644c0badc2cadfaac2d630ffc4af5f60 Mon Sep 17 00:00:00 2001 From: Cristy Date: Thu, 25 Jan 2018 19:51:31 -0500 Subject: [PATCH] Eliminate use-of-uninitialized-value in GetProfilesFromResourceBlock() Credit OSS Fuzz --- MagickCore/profile.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MagickCore/profile.c b/MagickCore/profile.c index cdfc41b1d..1fc90874c 100644 --- a/MagickCore/profile.c +++ b/MagickCore/profile.c @@ -1527,6 +1527,8 @@ static void GetProfilesFromResourceBlock(Image *image, /* Resolution. */ + if (count < 10) + break; p=ReadResourceLong(p,&resolution); image->resolution.x=((double) resolution)/65536.0; p=ReadResourceShort(p,&units)+2; -- 2.40.0