From 8484c8da34feaeae6b2335c3e5fabc0e13cab8bf Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Fri, 7 Jan 2011 11:41:24 +0900 Subject: [PATCH] Init setjmp buffer before calling jpeg_create_decompress() in DCTStream::init(). --- poppler/DCTStream.cc | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/poppler/DCTStream.cc b/poppler/DCTStream.cc index 212a8bd..07b9c7e 100644 --- a/poppler/DCTStream.cc +++ b/poppler/DCTStream.cc @@ -91,8 +91,10 @@ void DCTStream::init() limit = NULL; cinfo.err = &jerr; - jpeg_create_decompress(&cinfo); - cinfo.src = (jpeg_source_mgr *)&src; + if (!setjmp(src.setjmp_buffer)) { + jpeg_create_decompress(&cinfo); + cinfo.src = (jpeg_source_mgr *)&src; + } row_buffer = NULL; } -- 1.7.2.3