if file was damaged, it's file info in file is different from real file size.
in that case jpeg map feature have to deal with file info exceed buffer size.
I add error check code related with this
Change-Id: I72dad10bf48fb6930e3f8d1c1ff85d109d0bf4b9
{
struct jpeg_membuf_src *src = (struct jpeg_membuf_src *)cinfo->src;
+ long rec = 0;
+ rec = src->pub.bytes_in_buffer - num_bytes;
+
+ if (rec <0)
+ {
+ (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo));
+ }
+ else
+ {
src->pub.bytes_in_buffer -= num_bytes;
src->pub.next_input_byte += num_bytes;
+ }
}
static void