diff options
author | Rasmus Lerdorf <rasmus@php.net> | 2011-08-07 00:25:22 +0000 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@php.net> | 2011-08-07 00:25:22 +0000 |
commit | 99cb211c6c8d802e08e6c5c7deed044a59a29dbf (patch) | |
tree | 64dece693f9d044761aeb0d051c1a3817b5555e8 /Zend/zend.c | |
parent | 5a448d23b26bd07c58eb6dd28ce376b31b339ba0 (diff) | |
download | php-git-99cb211c6c8d802e08e6c5c7deed044a59a29dbf.tar.gz |
Use snprintf here instead to make the static analyzers happy.
Diffstat (limited to 'Zend/zend.c')
-rw-r--r-- | Zend/zend.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend.c b/Zend/zend.c index 738c1d179b..6b6b9c2af0 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -247,7 +247,7 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop break; case IS_RESOURCE: Z_STRVAL_P(expr_copy) = (char *) emalloc(sizeof("Resource id #") - 1 + MAX_LENGTH_OF_LONG); - Z_STRLEN_P(expr_copy) = sprintf(Z_STRVAL_P(expr_copy), "Resource id #%ld", Z_LVAL_P(expr)); + Z_STRLEN_P(expr_copy) = snprintf(Z_STRVAL_P(expr_copy), sizeof("Resource id #") - 1 + MAX_LENGTH_OF_LONG, "Resource id #%ld", Z_LVAL_P(expr)); break; case IS_ARRAY: Z_STRLEN_P(expr_copy) = sizeof("Array") - 1; |