mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Backport some printf() fixes to 7.2
This commit is contained in:
parent
9379b319b0
commit
95e9cc2871
3 changed files with 7 additions and 7 deletions
|
@ -2185,7 +2185,7 @@ static void accel_activate(void)
|
|||
|
||||
if (ZCG(counted)) {
|
||||
#ifdef ZTS
|
||||
zend_accel_error(ACCEL_LOG_WARNING, "Stuck count for thread id %d", tsrm_thread_id());
|
||||
zend_accel_error(ACCEL_LOG_WARNING, "Stuck count for thread id %lu", (unsigned long) tsrm_thread_id());
|
||||
#else
|
||||
zend_accel_error(ACCEL_LOG_WARNING, "Stuck count for pid %d", getpid());
|
||||
#endif
|
||||
|
|
|
@ -1481,7 +1481,7 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */
|
|||
|
||||
if (ZEND_SIZE_T_INT_OVFL(Z_STRLEN(key))) {
|
||||
zval_dtor(&key);
|
||||
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned an invalid key (too long)", ZSTR_VAL(ce->name));
|
||||
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %s returned an invalid key (too long)", ZSTR_VAL(ce->name));
|
||||
return ZEND_HASH_APPLY_STOP;
|
||||
}
|
||||
|
||||
|
@ -1615,7 +1615,7 @@ phar_spl_fileinfo:
|
|||
|
||||
if (ZEND_SIZE_T_INT_OVFL(Z_STRLEN(key))) {
|
||||
zval_dtor(&key);
|
||||
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned an invalid key (too long)", ZSTR_VAL(ce->name));
|
||||
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %s returned an invalid key (too long)", ZSTR_VAL(ce->name));
|
||||
return ZEND_HASH_APPLY_STOP;
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue