fix jpegload from empty buffer

could try to read a couple of non-existent bytes before failing ... now we
inject an EOI marker
This commit is contained in:
John Cupitt 2017-08-24 17:28:07 +01:00
parent 189c5f4762
commit 0ef01e9ca5

View File

@ -840,7 +840,7 @@ fill_input_buffer (j_decompress_ptr cinfo)
InputBuffer *src = (InputBuffer *) cinfo->src;
if (src->start_of_file) {
if (src->start_of_file && src->len > 0) {
src->pub.next_input_byte = src->buf;
src->pub.bytes_in_buffer = src->len;
src->start_of_file = FALSE;