Browse Source

Handle last or broken JP2 boxes correctly.

PHP-5.1
Stefan Esser 22 years ago
parent
commit
14abc19a76
  1. 5
      ext/standard/image.c

5
ext/standard/image.c

@ -708,6 +708,11 @@ static struct gfxinfo *php_handle_jp2(php_stream *stream TSRMLS_DC)
break;
}
/* Stop if this was the last box */
if ((int)box_length <= 0) {
break;
}
/* Skip over LBox (Which includes both TBox and LBox itself */
if (php_stream_seek(stream, box_length - 8, SEEK_CUR)) {
break;

Loading…
Cancel
Save