Use proper printf() specifiers

This commit is contained in:
Christoph M. Becker 2020-01-15 18:18:36 +01:00
parent 9118a96fb0
commit 5d3be966f9
2 changed files with 2 additions and 2 deletions

View File

@ -497,7 +497,7 @@ static void generate_dispids(php_dispatchex *disp)
char namebuf[32];
if (keytype == HASH_KEY_IS_LONG) {
snprintf(namebuf, sizeof(namebuf), "%d", pid);
snprintf(namebuf, sizeof(namebuf), ZEND_ULONG_FMT, pid);
name = zend_string_init(namebuf, strlen(namebuf), 0);
} else {
zend_string_addref(name);

View File

@ -270,7 +270,7 @@ PHPAPI int TSendMail(char *host, int *error, char **error_message,
/* 128 is safe here, the specifier in snprintf isn't longer than that */
*error_message = ecalloc(1, HOST_NAME_LEN + 128);
snprintf(*error_message, HOST_NAME_LEN + 128,
"Failed to connect to mailserver at \"%s\" port %d, verify your \"SMTP\" "
"Failed to connect to mailserver at \"%s\" port " ZEND_ULONG_FMT ", verify your \"SMTP\" "
"and \"smtp_port\" setting in php.ini or use ini_set()",
PW32G(mail_host), !INI_INT("smtp_port") ? 25 : INI_INT("smtp_port"));
return FAILURE;