[Poppler-bugs] [Bug 20484] New: Invalid usage of jpeglib in DCTScream.cc
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Mar 5 04:21:10 PST 2009
http://bugs.freedesktop.org/show_bug.cgi?id=20484
Summary: Invalid usage of jpeglib in DCTScream.cc
Product: poppler
Version: unspecified
Platform: x86 (IA32)
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: general
AssignedTo: poppler-bugs at lists.freedesktop.org
ReportedBy: rysiek at menel.com
In file DCTStream.cc:75 at method init() field cinfo.err is initialized after
call to jpeg_create_decompress(&cinfo) and this makes a segmentation fault when
an error thrown while calling this function (jpeg_create_decompress).
The correct usage should be like this:
void DCTStream::init()
{
jpeg_std_error(&jerr);
jerr.error_exit = &exitErrorHandler;
cinfo.err = &jerr;
src.pub.init_source = str_init_source;
src.pub.fill_input_buffer = str_fill_input_buffer;
src.pub.skip_input_data = str_skip_input_data;
src.pub.resync_to_restart = jpeg_resync_to_restart;
src.pub.term_source = str_term_source;
src.pub.bytes_in_buffer = 0;
src.pub.next_input_byte = NULL;
src.str = str;
src.index = 0;
src.abort = false;
cinfo.src = (jpeg_source_mgr *)&src;
jpeg_create_decompress(&cinfo);
x = 0;
row_buffer = NULL;
}
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Poppler-bugs
mailing list