summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/filter-dct.c2
-rw-r--r--source/fitz/load-jpeg.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/source/fitz/filter-dct.c b/source/fitz/filter-dct.c
index 54ec6a98..cdec5d3f 100644
--- a/source/fitz/filter-dct.c
+++ b/source/fitz/filter-dct.c
@@ -169,6 +169,8 @@ next_dctd(fz_context *ctx, fz_stream *stm, size_t max)
if (!state->init)
{
int c;
+
+ cinfo->src = NULL;
cinfo->client_data = state;
cinfo->err = &state->errmgr;
jpeg_std_error(cinfo->err);
diff --git a/source/fitz/load-jpeg.c b/source/fitz/load-jpeg.c
index 0634f239..a156c84d 100644
--- a/source/fitz/load-jpeg.c
+++ b/source/fitz/load-jpeg.c
@@ -236,6 +236,8 @@ fz_load_jpeg(fz_context *ctx, unsigned char *rbuf, size_t rlen)
fz_try(ctx)
{
+ cinfo.mem = NULL;
+ cinfo.global_state = 0;
cinfo.client_data = ctx;
cinfo.err = jpeg_std_error(&err);
err.error_exit = error_exit;
@@ -340,6 +342,8 @@ fz_load_jpeg_info(fz_context *ctx, unsigned char *rbuf, size_t rlen, int *xp, in
fz_try(ctx)
{
+ cinfo.mem = NULL;
+ cinfo.global_state = 0;
cinfo.client_data = ctx;
cinfo.err = jpeg_std_error(&err);
err.error_exit = error_exit;