]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Fri, 14 Sep 2018 23:28:23 +0000 (19:28 -0400)
committerCristy <urban-warrior@imagemagick.org>
Fri, 14 Sep 2018 23:28:34 +0000 (19:28 -0400)
coders/meta.c

index 26aef22e4fcc1c7ede08ec13258aae6142fb58e2..26c93b97702a671843282048819ccecf2b90e2c7 100644 (file)
@@ -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--)