php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2105 Crash in escapeshellcmd with an empty string
Submitted: 1999-08-18 13:06 UTC Modified: 1999-08-18 13:19 UTC
From: christophe dot massiot at mail dot dotcom dot fr Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0 Latest CVS (18/08/1999) OS: Linux 2.0.36/Debian slink
Private report: No CVE-ID: None
 [1999-08-18 13:06 UTC] christophe dot massiot at mail dot dotcom dot fr
The following script :

<?
$toto = escapeshellcmd(substr("", 0, 38));
?>

crashes with the following backtrace :

Program received signal SIGSEGV, Segmentation fault.
0x808240b in _php3_escapeshellcmd (str=0x0) at exec.c:330
330             l = strlen(str);
(gdb) bt
#0  0x808240b in _php3_escapeshellcmd (str=0x0) at exec.c:330
#1  0x80824fb in php3_escapeshellcmd (ht=1, return_value=0xbffff788, 
    list=0x80d90e0, plist=0x80d910c, this_ptr=0x0) at exec.c:355
#2  0x807407d in execute (op_array=0x80ee508) at zend_execute.c:1403
#3  0x8056dcc in php_execute_script (primary_file=0xbffff948) at main.c:1133
#4  0x805c6a1 in main (argc=2, argv=0xbffff9b8) at cgi_main.c:448

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-08-18 13:19 UTC] andrey at cvs dot php dot net
Fixed in CVS.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Nov 19 07:00:02 2026 UTC