JP2: Fix loader gettting stuck on no end marker.
commitc962710c01d67f93a2a39d49db5b5a678df8070e
authorCyril Hrubis <metan@ucw.cz>
Thu, 23 Oct 2014 08:31:19 +0000 (23 10:31 +0200)
committerCyril Hrubis <metan@ucw.cz>
Thu, 23 Oct 2014 08:32:36 +0000 (23 10:32 +0200)
tree79a249b87b04ed9e7e6ee865a66624755fe90e26
parentc0cfb2f6ac22689db526b97aa65cb0ca89bbb1cf
JP2: Fix loader gettting stuck on no end marker.

In case that the file ended up prematurely the read callback will spin
in infinite loop because the read has returned zero. Change it to return
-1 in this case which causes the openjpeg loader abort instead of the
infinite loop.

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