mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Revert "Fixed invalid read"
I must be confused while switching from master to 5.6
This reverts commit 94957a7091
.
This commit is contained in:
parent
94957a7091
commit
c75d245e82
@ -115,7 +115,7 @@ PHPAPI int php_exec(int type, char *cmd, zval *array, zval *return_value TSRMLS_
|
||||
} else if (type == 2) {
|
||||
/* strip trailing whitespaces */
|
||||
l = bufl;
|
||||
while (--l >= 0 && isspace(((unsigned char *)buf)[l]));
|
||||
while (l-- && isspace(((unsigned char *)buf)[l]));
|
||||
if (l != (int)(bufl - 1)) {
|
||||
bufl = l + 1;
|
||||
buf[bufl] = '\0';
|
||||
@ -128,7 +128,7 @@ PHPAPI int php_exec(int type, char *cmd, zval *array, zval *return_value TSRMLS_
|
||||
/* strip trailing whitespaces if we have not done so already */
|
||||
if ((type == 2 && buf != b) || type != 2) {
|
||||
l = bufl;
|
||||
while (--l >= 0 && isspace(((unsigned char *)buf)[l]));
|
||||
while (l-- && isspace(((unsigned char *)buf)[l]));
|
||||
if (l != (int)(bufl - 1)) {
|
||||
bufl = l + 1;
|
||||
buf[bufl] = '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user