1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
Index: php5-5.3.3.1/ext/standard/exec.c
===================================================================
--- php5-5.3.3.1.orig/ext/standard/exec.c 2010-03-12 11:28:59.000000000 +0100
+++ php5-5.3.3.1/ext/standard/exec.c 2016-02-24 14:11:14.000000000 +0100
@@ -442,6 +442,10 @@
}
if (command_len) {
+ if (command_len != strlen(command)) {
+ php_error_docref(NULL, E_ERROR, "Input string contains NULL bytes");
+ return;
+ }
cmd = php_escape_shell_cmd(command);
RETVAL_STRING(cmd, 0);
} else {
@@ -463,6 +467,10 @@
}
if (argument) {
+ if (argument_len != strlen(argument)) {
+ php_error_docref(NULL, E_ERROR, "Input string contains NULL bytes");
+ return;
+ }
cmd = php_escape_shell_arg(argument);
RETVAL_STRING(cmd, 0);
}
|