From 5c4a77720af5fea59a5eee70f89896c6144103da Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 24 Dec 2018 10:47:11 -0500 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12204 --- coders/cube.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coders/cube.c b/coders/cube.c index 3e2a54e3e..4f95d6fae 100644 --- a/coders/cube.c +++ b/coders/cube.c @@ -204,13 +204,13 @@ static Image *ReadCUBEImage(const ImageInfo *image_info, char *q; + if (n >= (cube_level*cube_level*cube_level)) + break; q=buffer; cube[n].r=StringToDouble(q,&q); cube[n].g=StringToDouble(q,&q); cube[n].b=StringToDouble(q,&q); n++; - if (n >= (cube_level*cube_level*cube_level)) - break; } else if (('+' < *buffer) && (*buffer < ':')) -- 2.40.0