Bug #80811 [Asn->Csd]: Function exec without $output but with $restult_code parameter crashes
Edit report at https://bugs.php.net/bug.php?id=80811&edit=1
ID: 80811
Updated by: nikic@php.net
Reported by: carlosv775 at gmail dot com
Summary: Function exec without $output but with $restult_code
parameter crashes
-Status: Assigned
+Status: Closed
Type: Bug
Package: Reproducible crash
PHP Version: 8.0.2
Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=75a4f484f058f50fa1bb70c1eb5388409910203b
Log: Fixed bug #80811
Previous Comments:
------------------------------------------------------------------------
[2021-02-28 02:30:32] carlosv775 at gmail dot com
Description:
------------
If we execute the function exec passing the $result_code but not passing
the $output, it gives us a segfault error. This was discovered here:
https://github.com/cviniciussdias/php-text-to-speech/issues/2
And can be reproduced here:
https://3v4l.org/NeONG
Test script:
---------------
<?php
echo 'Executing with all params:' . PHP_EOL;
exec('echo Something', output: $output, result_code: $resultCode);
echo 'Executing without output param:' . PHP_EOL;
exec('echo Something', result_code: $resultCode);
echo 'The End';
Expected result:
----------------
No errors should be displayed and the command should be executed.
Actual result:
--------------
Process exited with code 139.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80811&edit=1
Thread (2 messages)