|
|
|
@ -295,7 +295,7 @@ PHPAPI zend_string *php_escape_shell_cmd(char *str) |
|
|
|
|
|
|
|
/* max command line length - two single quotes - \0 byte length */ |
|
|
|
if (l > cmd_max_len - 2 - 1) { |
|
|
|
php_error_docref(NULL, E_ERROR, "Command exceeds the allowed length of %d bytes", cmd_max_len); |
|
|
|
php_error_docref(NULL, E_ERROR, "Command exceeds the allowed length of %zu bytes", cmd_max_len); |
|
|
|
return ZSTR_EMPTY_ALLOC(); |
|
|
|
} |
|
|
|
|
|
|
|
@ -371,7 +371,7 @@ PHPAPI zend_string *php_escape_shell_cmd(char *str) |
|
|
|
ZSTR_VAL(cmd)[y] = '\0'; |
|
|
|
|
|
|
|
if (y > cmd_max_len + 1) { |
|
|
|
php_error_docref(NULL, E_ERROR, "Escaped command exceeds the allowed length of %d bytes", cmd_max_len); |
|
|
|
php_error_docref(NULL, E_ERROR, "Escaped command exceeds the allowed length of %zu bytes", cmd_max_len); |
|
|
|
zend_string_release(cmd); |
|
|
|
return ZSTR_EMPTY_ALLOC(); |
|
|
|
} |
|
|
|
@ -399,7 +399,7 @@ PHPAPI zend_string *php_escape_shell_arg(char *str) |
|
|
|
|
|
|
|
/* max command line length - two single quotes - \0 byte length */ |
|
|
|
if (l > cmd_max_len - 2 - 1) { |
|
|
|
php_error_docref(NULL, E_ERROR, "Argument exceeds the allowed length of %d bytes", cmd_max_len); |
|
|
|
php_error_docref(NULL, E_ERROR, "Argument exceeds the allowed length of %zu bytes", cmd_max_len); |
|
|
|
return ZSTR_EMPTY_ALLOC(); |
|
|
|
} |
|
|
|
|
|
|
|
@ -458,7 +458,7 @@ PHPAPI zend_string *php_escape_shell_arg(char *str) |
|
|
|
ZSTR_VAL(cmd)[y] = '\0'; |
|
|
|
|
|
|
|
if (y > cmd_max_len + 1) { |
|
|
|
php_error_docref(NULL, E_ERROR, "Escaped argument exceeds the allowed length of %d bytes", cmd_max_len); |
|
|
|
php_error_docref(NULL, E_ERROR, "Escaped argument exceeds the allowed length of %zu bytes", cmd_max_len); |
|
|
|
zend_string_release(cmd); |
|
|
|
return ZSTR_EMPTY_ALLOC(); |
|
|
|
} |
|
|
|
|