From: Cristy Date: Fri, 14 Sep 2018 23:28:23 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.8-12~49 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb47e6a2ff0dc7ccd97bdf60ad829eeb3a14c6e6;p=imagemagick ... --- diff --git a/coders/meta.c b/coders/meta.c index 26aef22e4..26c93b977 100644 --- a/coders/meta.c +++ b/coders/meta.c @@ -930,7 +930,7 @@ static int jpeg_skip_variable(Image *ifile, Image *ofile) if ((c2 = jpeg_transfer_1(ifile, ofile)) == EOF) return M_EOI; - length = (((unsigned char) c1) << 8) + ((unsigned char) c2); + length = (((unsigned int) c1) << 8) + ((unsigned int) c2); length -= 2; while (length--) @@ -949,7 +949,7 @@ static int jpeg_skip_variable2(Image *ifile, Image *ofile) if ((c1 = ReadBlobByte(ifile)) == EOF) return M_EOI; if ((c2 = ReadBlobByte(ifile)) == EOF) return M_EOI; - length = (((unsigned char) c1) << 8) + ((unsigned char) c2); + length = (((unsigned int) c1) << 8) + ((unsigned int) c2); length -= 2; while (length--)