summaryrefslogtreecommitdiff
path: root/ext/standard/iptc.c
diff options
context:
space:
mode:
authorThies C. Arntzen <thies@php.net>2001-07-13 14:35:05 +0000
committerThies C. Arntzen <thies@php.net>2001-07-13 14:35:05 +0000
commitba17fadbfb9423f53a49b8587e5cdace9d518ba4 (patch)
treefec431a104e159f6f11cd96bdd48b18bd0c8793d /ext/standard/iptc.c
parent742c5c8e03257f3ce61cf32ab64be001fcd7075c (diff)
downloadphp-git-ba17fadbfb9423f53a49b8587e5cdace9d518ba4.tar.gz
@ - Fixed crash in iptcparse() if the supplied data was bogus. (Thies)
Diffstat (limited to 'ext/standard/iptc.c')
-rw-r--r--ext/standard/iptc.c2
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 */