loaders: JPG: Fix read callback
commite9d8edec450a97a0b8741273bb5d5e90fb94c821
authorCyril Hrubis <metan@ucw.cz>
Wed, 9 Dec 2015 13:47:15 +0000 (9 14:47 +0100)
committerCyril Hrubis <metan@ucw.cz>
Wed, 9 Dec 2015 13:47:15 +0000 (9 14:47 +0100)
treefe4c00c3c3aec8afe003f28d714b60dd096b8f19
parentffbfb62987085873f5996218fdf3fbb7ae0390e4
loaders: JPG: Fix read callback

Apparently when I/O read callback returns buffer of size 0 the libjpeg
segfaults. So we now return FALSE from the callback even when read
returns 0, which means end of the file when the underlying I/O is file
based.

Special thanks to the american fuzzy lop (afl).

Signed-off-by: Cyril Hrubis <metan@ucw.cz>
libs/loaders/GP_JPG.c