summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Esser <sesser@php.net>2005-03-01 13:53:35 +0000
committerStefan Esser <sesser@php.net>2005-03-01 13:53:35 +0000
commit62ef5f3566e467681234292aa319696bf715d7cf (patch)
treef7234dd12a9e96ac475438b1300c84515f851d6d
parent3fdc0745f15633d5b579acbcf227ddadbfe12227 (diff)
downloadphp-git-62ef5f3566e467681234292aa319696bf715d7cf.tar.gz
MFH
-rw-r--r--ext/standard/image.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/standard/image.c b/ext/standard/image.c
index 3ff6e87c7f..52e3b2fc55 100644
--- a/ext/standard/image.c
+++ b/ext/standard/image.c
@@ -711,6 +711,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;