summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2016-03-28 01:32:11 +0200
committerRobin Watts <robin.watts@artifex.com>2016-03-29 13:06:27 +0100
commit517959e08d016aef6d6dcd34d89ef4d279e3d308 (patch)
treeb59859046de7279f553b99c0e1a5058e012e8a2a /source
parent60f842b8573dd4a4bbc817acaa336b63b98ee3c8 (diff)
downloadmupdf-517959e08d016aef6d6dcd34d89ef4d279e3d308.tar.xz
bmp: Parse OS/2 header compression field correctly.
Diffstat (limited to 'source')
-rw-r--r--source/fitz/load-bmp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/fitz/load-bmp.c b/source/fitz/load-bmp.c
index 5582d276..3eda1614 100644
--- a/source/fitz/load-bmp.c
+++ b/source/fitz/load-bmp.c
@@ -148,13 +148,15 @@ bmp_read_bitmap_os2_header(fz_context *ctx, struct info *info, unsigned char *p,
info->width = read32(p + 4);
info->height = read32(p + 8);
info->bitcount = read16(p + 14);
- info->compression = read32(p + 16);
+
+ info->compression = BI_RGB;
}
if (size >= 64)
{
if (end - p < 64)
fz_throw(ctx, FZ_ERROR_GENERIC, "premature end in bitmap os2 header in bmp image");
+ info->compression = read32(p + 16);
info->xres = read32(p + 24);
info->yres = read32(p + 28);
info->colors = read32(p + 32);