diff options
-rw-r--r-- | ext/standard/iptc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c index 0d07354455..8fb51fb9a3 100644 --- a/ext/standard/iptc.c +++ b/ext/standard/iptc.c @@ -351,7 +351,7 @@ PHP_FUNCTION(iptcparse) sprintf(key,"%d#%03d",(unsigned int) dataset,(unsigned int) recnum); - if ((inx + len) > length) + if ((len > length) || (inx + len) > length) break; if (tagsfound == 0) { /* found the 1st tag - initialize the return array */ |