]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5858
authorCristy <urban-warrior@imagemagick.org>
Wed, 31 Jan 2018 23:36:46 +0000 (18:36 -0500)
committerCristy <urban-warrior@imagemagick.org>
Wed, 31 Jan 2018 23:36:46 +0000 (18:36 -0500)
coders/sixel.c

index 5f0f8072695fb0d83849e9c05ead99990d238669..0e7b7298319a21947b535e0045cf2ab9a03b8827 100644 (file)
@@ -336,8 +336,8 @@ MagickBooleanType sixel_decode(unsigned char              /* in */  *p,
                     if (param[2] == 0) {
                         param[2] = 10;
                     }
-                    attributed_pan = attributed_pan * param[2] / 10;
-                    attributed_pad = attributed_pad * param[2] / 10;
+                    attributed_pan = (int) ((ssize_t) attributed_pan * param[2]) / 10;
+                    attributed_pad = (int) ((ssize_t) attributed_pad * param[2]) / 10;
                     if (attributed_pan <= 0) attributed_pan = 1;
                     if (attributed_pad <= 0) attributed_pad = 1;
                 }