Bug #73881 [Opn->Dup]: A code that makes segmentation fault

From: Date: Fri, 06 Jan 2017 15:17:18 +0000
Subject: Bug #73881 [Opn->Dup]: A code that makes segmentation fault
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206318@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73881&edit=1 ID: 73881 Updated by: nikic@php.net Reported by: eruiz at dataclick dot es Summary: A code that makes segmentation fault -Status: Open +Status: Duplicate Type: Bug Package: *General Issues Operating System: Linux Gentoo PHP Version: 7.1.0 Block user comment: N Private report: N New Comment: Duplicate of bug #73668, which will be fixed in 7.1.1. Previous Comments: ------------------------------------------------------------------------ [2017-01-06 13:28:59] eruiz at dataclick dot es Description: ------------ Hello, I notice you about this bug that causes that PHP fails and 'Segmentation Fault' and so you can see "Error Gateway" in browser!! Only happens with new released version PHP 7.1.0 and without execution code! just reading the file fpdf.php that I use to generate PDF files (http://www.fpdf.org) and in function "Image" in main class: This code in the file and "without execution" causes segmentation fault when PHP only read the file: if($w<0) $w = -$info['w']*72/$w/$this->k; if($h<0) $h = -$info['h']*72/$h/$this->k; To solve it... I have changed avoiding /$w and /$h because it's seem that PHP consider value as 0 or whatever if($w<0) $w = -$info['w']*72/min($w,1)/$this->k; if($h<0) $h = -$info['h']*72/min($h,1)/$this->k; Thanks and happy new year from Spain ;) Eduardo Ruiz Test script: --------------- // Just create a file with these lines and without execution and read it: if($w<0) $w = -$info['w']*72/$w/$this->k; if($h<0) $h = -$info['h']*72/$h/$this->k; Expected result: ---------------- No segmentation fault!!! Actual result: -------------- Segmentation Fault and Gateway error ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73881&edit=1

« previous php.bugs (#206318) next »