Bug #73019 [Opn->Fbk]: getimageszie can not recognize a special kind of jpg file

From: Date: Mon, 05 Sep 2016 10:50:57 +0000
Subject: Bug #73019 [Opn->Fbk]: getimageszie can not recognize a special kind of jpg file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203804@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73019&edit=1 ID: 73019 Updated by: cmb@php.net Reported by: zws at ahtvu dot ah dot cn Summary: getimageszie can not recognize a special kind of jpg file -Status: Open +Status: Feedback Type: Bug Package: GetImageSize related Operating System: any PHP Version: 7.0.10 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: That appears to be a duplicate of bug #72278, which has been fixed, but the fix has not yet been released. Can you please confirm with a current Git snapshot of PHP? Previous Comments: ------------------------------------------------------------------------ [2016-09-05 09:45:07] zws at ahtvu dot ah dot cn Description: ------------ I found a problem when php recongize a jpg file.This file can be rendered by acdsee,ie,firefox,etc,but getimagesize function returns false. Your can download the file from url http://bm.ahtvu.ah.cn/img/20163/a/6/5177/org_faceimg.jpg. This file have a lot of zeros between jpg data sections,I check php source code and find that php_next_marker function can not cope with it. I give the following patch which I can not ensure ok under any circumstances. [root@cache84 standard]# diff image.c patch_image.c 416c416 < } while (marker == 0xff); --- > } while (marker == 0xff || marker == 0); Test script: --------------- <?php var_dump(getimagesize('/root/f.jpg')); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73019&edit=1

« previous php.bugs (#203804) next »