]> granicus.if.org Git - php/commitdiff
use snprintf
authorStanislav Malyshev <stas@php.net>
Wed, 21 Feb 2007 21:08:58 +0000 (21:08 +0000)
committerStanislav Malyshev <stas@php.net>
Wed, 21 Feb 2007 21:08:58 +0000 (21:08 +0000)
ext/soap/php_http.c

index 0c2109f1fce69bb36449784b131595937f857b27..a54c1c70b509b1170d498f23daf433a9f8d922c6 100644 (file)
@@ -480,7 +480,7 @@ try_again:
                                        if (zend_hash_find(Z_ARRVAL_PP(digest), "nc", sizeof("nc"), (void **)&tmp) == SUCCESS &&
                                            Z_TYPE_PP(tmp) == IS_LONG) {
                                                Z_LVAL_PP(tmp)++;
-                                               sprintf(nc, "%08ld", Z_LVAL_PP(tmp));
+                                               snprintf(nc, sizeof(nc), "%08ld", Z_LVAL_PP(tmp));
                                        } else {
                                                add_assoc_long(*digest, "nc", 1);
                                                strcpy(nc, "00000001");