diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2017-06-02 00:04:30 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2017-06-02 00:05:11 +0800 |
commit | 9ae994a130a66a375e9ff2d85f6d5d079eeb0adb (patch) | |
tree | 7e510d93ee728b193a1f8185bc51c62777c4b933 /source/fitz | |
parent | 1ec306edc6636d35c51a4ba48b1c52e0266fac32 (diff) | |
download | mupdf-9ae994a130a66a375e9ff2d85f6d5d079eeb0adb.tar.xz |
tiff: Avoid dropping wild pointer in case of error.
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/load-tiff.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/fitz/load-tiff.c b/source/fitz/load-tiff.c index 2a0029d8..52dd1893 100644 --- a/source/fitz/load-tiff.c +++ b/source/fitz/load-tiff.c @@ -290,7 +290,7 @@ tiff_expand_colormap(fz_context *ctx, struct tiff *tiff) static unsigned tiff_decode_data(fz_context *ctx, struct tiff *tiff, unsigned char *rp, unsigned int rlen, unsigned char *wp, unsigned int wlen) { - fz_stream *stm; + fz_stream *stm = NULL; unsigned i, size; unsigned char *reversed = NULL; fz_stream *jpegtables = NULL; @@ -308,6 +308,8 @@ tiff_decode_data(fz_context *ctx, struct tiff *tiff, unsigned char *rp, unsigned rp = reversed; } + fz_var(stm); + fz_try(ctx) { /* each decoder will close this */ |