summaryrefslogtreecommitdiff
path: root/modules/exif
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-04-27 03:58:16 +0000
committerBharat Mediratta <bharat@menalto.com>2009-04-27 03:58:16 +0000
commitf118fc0c14d8422362819da5d36366af8deaa047 (patch)
treee85fc80ba622feeedb342dba61978357b15f1d7a /modules/exif
parentf51765a4b25ae66e0554e72f9342724313a6c3b6 (diff)
Fix an edge case with GPS data handling that results in this error:
fread: Length parameter must be greater than 0 in file modules/exif/lib/makers/gps.php on line 197 Filed upstream as: http://www.zenphoto.org/trac/ticket/1108
Diffstat (limited to 'modules/exif')
-rw-r--r--modules/exif/lib/makers/gps.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/exif/lib/makers/gps.php b/modules/exif/lib/makers/gps.php
index 838c05a8..e520a1f7 100644
--- a/modules/exif/lib/makers/gps.php
+++ b/modules/exif/lib/makers/gps.php
@@ -195,6 +195,10 @@ function parseGPS($block,&$result,$offset,$seek, $globalOffset) {
$num=hexdec($num);
$result['GPS']['NumTags'] = $num;
+ if ($num == 0) {
+ return;
+ }
+
$block = fread( $seek, $num*12 );
$place = 0;