php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14731 read_exif_data crash reading specific images
Submitted: 2001-12-28 07:26 UTC Modified: 2005-02-01 23:00 UTC
Votes:6
Avg. Score:4.0 ± 1.4
Reproduced:4 of 5 (80.0%)
Same Version:3 (75.0%)
Same OS:0 (0.0%)
From: jt-news at thoestesen dot dk Assigned: helly (profile)
Status: Closed Package: EXIF related
PHP Version: 4.1.0 OS: FreeBSD 4.4
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jt-news at thoestesen dot dk
New email:
PHP Version: OS:

 

 [2001-12-28 07:26 UTC] jt-news at thoestesen dot dk
When calling read_exif_data with a picture taken with a Kodak DC240 it causes PHP to crash. (This error is probably related to bug #14026)

It seems to be caused to the (mis-)reading of the thumbnail-info from the exif-tag. After changing the ext/exif.c and removing the cases TAG_JPEGQUAL and TAG_MACRO at line 760-779, the read_exif_data runs without any problems - But then (of course) it only read the data about the picture and not the thumbnail.

To reproduce call read_exif_data with any photo taken with a Kodak DC240
Examplephoto http://thoestesen.dk/DCP_4030.JPG

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-11 17:43 UTC] chrille at isa dot dknet dot dk
I've been strugling with this issue for some time, also on FreeBSD 4.4-stable. The bug still exists in CVS as of today. I can also conform that removing TAG_JPEGQUAL and TAG_MACRO fixes the problem.
 [2002-02-11 23:01 UTC] cvig at raw-io dot com
I had it working ok when reading one file from a DC4800.  Tried to open 10 in a row and I got the following error in the apache log file for each file:

FATAL:  emalloc():  Unable to allocate -2147483648 bytes

FreeBSD 4.5, PHP 4.1.1
 [2002-02-21 04:40 UTC] limefest at NOSPAM dot underworld dot net
I get the same problem reported here. It doesn't break on all my images. Just certain ones (all taken with the same camera.)

Apache logs:
FATAL:  emalloc():  Unable to allocate -2147483648 bytes

System Info:
Apache/1.3.22 (Unix)  (Red-Hat/Linux) mod_ssl/2.8.5 OpenSSL/0.9.6b DAV/1.0.2 PHP/4.1.1 mod_perl/1.24_01
 [2002-02-21 04:41 UTC] limefest at NOSPAM dot underworld dot net
... camera is Pentax Optio 330
 [2002-03-02 12:11 UTC] helly@php.net
This bug has been fixed in CVS.

Original version was not really standard complient...

Hope i fixed all. But i implemented a test mechanism and
it works with all files from exif.org now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC