Bug #8962 Updated: (8212) If the result of an exec() command is one character the result is empty.

From: Date: Sat, 28 Apr 2001 13:20:28 +0000
Subject: Bug #8962 Updated: (8212) If the result of an exec() command is one character the result is empty.
Groups: php.dev 
Request: Send a blank email to php-dev+get-52698@lists.php.net to get a copy of this message
ID: 8962 Updated by: elixer Reported By: bram@xspace.com Old-Status: Open Status: Closed Bug Type: Program Execution PHP Version: 4.0.4pl1 Assigned To: Comments: Fixed in CVS. Wait for 4.0.6. Previous Comments: --------------------------------------------------------------------------- [2001-02-22 05:21:11] stas@php.net reclassify --------------------------------------------------------------------------- [2001-01-28 00:15:46] bram@xspace.com This is the solution to problem 8212 File: ext/standard/exec.c Function _Exec: Contains: RETVAL_STRINGL(buf,l?l+1:0,1); However, it should contain: RETVAL_STRINGL(buf,l?l+1:((isspace((int)buf[0]) || !buf[0])?0:1),1); The problem lies in code previous which reads: /* strip trailing spaces */ l = strlen(buf); t = l; while (l && isspace((int)buf[--l])); if (l < t) buf[l + 1] = '

« previous php.dev (#52698) next »