From 5572ab892fef97ecbe813728d17370b4184da0d1 Mon Sep 17 00:00:00 2001 From: cristy <cristy@aa41f4f7-0bf4-0310-aa73-e5a19afd5a74> Date: Sun, 25 Jan 2015 17:31:57 +0000 Subject: Fix a DOS in viccar file handling The current code does not check for EOF condition leading to infinite loop origin: http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=26933 git-svn-id: https://subversion.imagemagick.org/subversion/ImageMagick/branches/ImageMagick-6@17856 aa41f4f7-0bf4-0310-aa73-e5a19afd5a74 --- coders/vicar.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coders/vicar.c b/coders/vicar.c index 205fd90..be47e86 100644 --- a/coders/vicar.c +++ b/coders/vicar.c @@ -275,6 +275,8 @@ static Image *ReadVICARImage(const ImageInfo *image_info, while (count < (ssize_t) length) { c=ReadBlobByte(image); + if (c == EOF) + break; count++; } if ((image->columns == 0) || (image->rows == 0)) -- cgit v0.11.2