From 2eaa779a1cac30dc1a909a850bfac78be14d907c Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Tue, 27 Sep 2016 11:35:19 +0800 Subject: Bug 697160: gif: Transparency index must be inside color table. --- source/fitz/load-gif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/fitz/load-gif.c') diff --git a/source/fitz/load-gif.c b/source/fitz/load-gif.c index 3d8a7354..0eda5bcb 100644 --- a/source/fitz/load-gif.c +++ b/source/fitz/load-gif.c @@ -146,7 +146,7 @@ gif_read_lsd(fz_context *ctx, struct info *info, unsigned char *p, unsigned char if (info->has_gct) { info->gct_entries = 1 << ((p[4] & 0x7) + 1); - info->gct_background = p[5]; + info->gct_background = fz_clampi(p[5], 0, info->gct_entries - 1); } info->aspect = p[6]; -- cgit v1.2.3