php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66065 read_exif_data fail with 'Segmentation fault'
Submitted: 2013-11-08 15:02 UTC Modified: 2013-11-11 08:31 UTC
From: szerencsits dot michael at gmx dot at Assigned: remi (profile)
Status: Closed Package: EXIF related
PHP Version: 5.5.5 OS: Fedora Core 19
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: szerencsits dot michael at gmx dot at
New email:
PHP Version: OS:

 

 [2013-11-08 15:02 UTC] szerencsits dot michael at gmx dot at
Description:
------------
Hello, 

I installed the php rpm from Fedora 19 and updated it also to the latest available fedora version:

[root@server ~]# php -v
PHP 5.5.5 (cli) (built: Oct 17 2013 06:05:14)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies

I've I now use read_exif_data to get the EXIF data it fails with 'Segmentation fault'. This happen only with jpg from my 'newer' camera. If I use a jpg from my 'old' camera it work. Here a working and a failing picture:

http://zerberus.amolymp.net/fotos/failing.jpg
http://zerberus.amolymp.net/fotos/working.jpg


Test script:
---------------
<?php #filename rdexif.php

$exif_data = read_exif_data($argv[1]);
print_r($exif_data);

?>

run with php ./rdexif.php failing.jpg
run with php ./rdexif.php working.jpg

Expected result:
----------------
EXIF data ARRAY

Actual result:
--------------
Segmentation Fault

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-11-08 15:52 UTC] szerencsits dot michael at gmx dot at
[root@server ~]# uname -a
Linux server.localdomain 3.11.4-201.fc19.x86_64 #1 SMP Thu Oct 10 14:11:18 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
 [2013-11-09 15:34 UTC] remi@php.net
Sorry, but I cannot reproduce.

$ run with php ./rdexif.php failing.jpg
Array
(
    [FileName] => failing.jpg
    [FileDateTime] => 1384010956
    [FileSize] => 3142954
    [FileType] => 2
    [MimeType] => image/jpeg
    [SectionsFound] => ANY_TAG, IFD0, THUMBNAIL, EXIF, INTEROP, WINXP
...

It will probably simpler to let "abrt" report the segfault with a backtrace.
 [2013-11-09 15:35 UTC] remi@php.net
-Status: Open +Status: Feedback
 [2013-11-09 15:35 UTC] remi@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2013-11-09 15:39 UTC] remi@php.net
-Assigned To: +Assigned To: remi
 [2013-11-11 08:16 UTC] szerencsits dot michael at gmx dot at
-Status: Feedback +Status: Assigned
 [2013-11-11 08:16 UTC] szerencsits dot michael at gmx dot at
Hi Remi,

I've removed the php package from Fedora 19 and compiled php from the tar.
With this the read_exif_data work.

So it seems this is a bug in the Fedora Package.

Thanks for your help,
Michael
 [2013-11-11 08:31 UTC] remi@php.net
-Status: Assigned +Status: Closed
 [2013-11-11 08:31 UTC] remi@php.net
So closing this one as this is not a PHP bug.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 10:01:29 2025 UTC