]> granicus.if.org Git - php/commitdiff
refixed printf fmt, used portable macros
authorAnatol Belski <ab@php.net>
Sat, 20 Sep 2014 13:46:19 +0000 (15:46 +0200)
committerAnatol Belski <ab@php.net>
Sat, 20 Sep 2014 13:46:19 +0000 (15:46 +0200)
ext/standard/crypt_sha256.c
ext/standard/crypt_sha512.c

index ee68cec0275c6fad512bf1eb96c2bf7b6ddbf292..5f28bd7b9fc4d46bf3d2c0ea4a946189a940db19 100644 (file)
@@ -520,7 +520,7 @@ char * php_sha256_crypt_r(const char *key, const char *salt, char *buffer, int b
 
        if (rounds_custom) {
 #ifdef PHP_WIN32
-               int n = _snprintf(cp, MAX(0, buflen), "%s%I64u$", sha256_rounds_prefix, rounds);
+               int n = _snprintf(cp, MAX(0, buflen), "%s" ZEND_ULONG_FMT "$", sha256_rounds_prefix, rounds);
 #else
                int n = snprintf(cp, MAX(0, buflen), "%s%zu$", sha256_rounds_prefix, rounds);
 #endif
index 9e5def38c5836c54dab3b03dbdf3481fbd7808ef..df5f3d109e6cbdf701d926578f4cfc1beb70ad8f 100644 (file)
@@ -555,7 +555,7 @@ php_sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen)
 
        if (rounds_custom) {
 #ifdef PHP_WIN32
-         int n = _snprintf(cp, MAX(0, buflen), "%s%I64u$", sha512_rounds_prefix, rounds);
+         int n = _snprintf(cp, MAX(0, buflen), "%s" ZEND_ULONG_FMT "$", sha512_rounds_prefix, rounds);
 #else
          int n = snprintf(cp, MAX(0, buflen), "%s%zu$", sha512_rounds_prefix, rounds);
 #endif