diff options
author | Cristy <urban-warrior@imagemagick.org> | 2016-04-23 10:48:31 -0400 |
---|---|---|
committer | Cristy <urban-warrior@imagemagick.org> | 2016-04-23 10:48:31 -0400 |
commit | 1fe0b879964fa7797e3d68574d297922a47c4034 (patch) | |
tree | 393bd767ddb989c6c85bab71cdd267db9a2e3080 /coders/pes.c | |
parent | 46f5a05f2c93fe6443c43d70705c15b1b5c69a4f (diff) | |
download | ImageMagick-1fe0b879964fa7797e3d68574d297922a47c4034.tar.gz |
Support signed blob reads
Diffstat (limited to 'coders/pes.c')
-rw-r--r-- | coders/pes.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/coders/pes.c b/coders/pes.c index 8445471d3..f18219ba9 100644 --- a/coders/pes.c +++ b/coders/pes.c @@ -492,7 +492,7 @@ static Image *ReadPESImage(const ImageInfo *image_info,ExceptionInfo *exception) if ((count != 4) || (LocaleNCompare((char *) magick,"#PES",4) != 0)) ThrowReaderException(CorruptImageError,"ImproperImageHeader"); count=ReadBlob(image,4,version); - offset=(int) ReadBlobLSBLong(image); + offset=ReadBlobLSBSignedLong(image); if (DiscardBlobBytes(image,offset+36) == MagickFalse) ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile", image->filename); @@ -504,7 +504,7 @@ static Image *ReadPESImage(const ImageInfo *image_info,ExceptionInfo *exception) number_colors=(size_t) ReadBlobByte(image)+1; for (i=0; i < (ssize_t) number_colors; i++) { - j=(int) ReadBlobByte(image); + j=ReadBlobByte(image); blocks[i].color=PESColor+(j < 0 ? 0 : j); blocks[i].offset=0; } @@ -533,8 +533,8 @@ static Image *ReadPESImage(const ImageInfo *image_info,ExceptionInfo *exception) delta_y=0; while (EOFBlob(image) != EOF) { - x=(int) ReadBlobByte(image); - y=(int) ReadBlobByte(image); + x=ReadBlobByte(image); + y=ReadBlobByte(image); if ((x == 0xff) && (y == 0)) break; if ((x == 254) && (y == 176)) |