summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2015-07-31 11:03:26 +0200
committerTor Andersson <tor.andersson@artifex.com>2015-08-20 11:22:56 +0200
commit607074367a9cb5bd7edbe722f175d5ee2d5538e3 (patch)
tree3f9dadc1c24757a819a96bb87e21d3a5e4d625cf
parent5b2252db42ec757f8d3fe37617661f3dc8fe9d72 (diff)
downloadmupdf-607074367a9cb5bd7edbe722f175d5ee2d5538e3.tar.xz
Fix a few signedness issues in gif decoder.
-rw-r--r--source/fitz/load-gif.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/fitz/load-gif.c b/source/fitz/load-gif.c
index 71d120b0..c99f3d4b 100644
--- a/source/fitz/load-gif.c
+++ b/source/fitz/load-gif.c
@@ -12,12 +12,12 @@ struct info
unsigned int image_interlaced;
int has_gct;
- unsigned int gct_entries;
+ int gct_entries;
unsigned char *gct;
unsigned int gct_background;
int has_lct;
- unsigned int lct_entries;
+ int lct_entries;
unsigned char *lct;
int has_transparency;
@@ -209,7 +209,7 @@ gif_read_line(fz_context *ctx, struct info *info, const unsigned char *ct, unsig
unsigned int index = (info->image_top + y) * info->width + info->image_left;
unsigned char *dp = &info->samples[index * 3];
unsigned char *mp = &info->mask[index];
- int x, k;
+ unsigned int x, k;
for (x = 0; x < info->image_width; x++, sp++, mp++, dp += 3)
if (!info->has_transparency || *sp != info->transparent)
@@ -526,7 +526,7 @@ gif_mask_transparency(fz_context *ctx, fz_pixmap *image, struct info *info)
{
unsigned char *mp = info->mask;
unsigned char *dp = image->samples;
- int x, y;
+ unsigned int x, y;
for (y = 0; y < info->height; y++)
for (x = 0; x < info->width; x++, mp++, dp += image->n)