* Fix scanner crash due to another type of malformed embedded JPEG data.

This commit is contained in:
Justin Maggard 2009-05-13 08:49:02 +00:00
parent 81f9fa80a5
commit 41fdd7f88e

View File

@ -132,7 +132,15 @@ init_source(j_decompress_ptr cinfo)
static int
fill_input_buffer(j_decompress_ptr cinfo)
{
return 1;
struct my_src_mgr *src = (void *)cinfo->src;
/* Create a fake EOI marker */
src->eoi_buffer[0] = (JOCTET) 0xFF;
src->eoi_buffer[1] = (JOCTET) JPEG_EOI;
src->pub.next_input_byte = src->eoi_buffer;
src->pub.bytes_in_buffer = 2;
return TRUE;
}
static void