Skip to content

Commit 7d0e3c0

Browse files
author
Yasuo Ohgaki
committed
Added NULL byte protection to exec, system and passthru.
1 parent 096fb06 commit 7d0e3c0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
. Removed dl() function on fpm-fcgi. (Nikita)
4747
. Removed support for hexadecimal numeric strings. (Nikita)
4848
. Removed obsolete extensions and SAPIs. See the full list in UPGRADING. (Anatol)
49+
. Added NULL byte protection to exec, system and passthru. (Yasuo)
4950

5051
- Curl:
5152
. Fixed bug #68937 (Segfault in curl_multi_exec). (Laruence)

ext/standard/exec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ static void php_exec_ex(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
190190
RETURN_FALSE;
191191
}
192192
if (strlen(cmd) != cmd_len) {
193-
php_error_docref(NULL TSRMLS_CC, E_WARNING, "NULL byte detected. Possible attack");
193+
php_error_docref(NULL, E_WARNING, "NULL byte detected. Possible attack");
194194
RETURN_FALSE;
195195
}
196196

0 commit comments

Comments
 (0)