summaryrefslogtreecommitdiff
path: root/Zend/zend.c
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2011-08-07 00:25:22 +0000
committerRasmus Lerdorf <rasmus@php.net>2011-08-07 00:25:22 +0000
commit99cb211c6c8d802e08e6c5c7deed044a59a29dbf (patch)
tree64dece693f9d044761aeb0d051c1a3817b5555e8 /Zend/zend.c
parent5a448d23b26bd07c58eb6dd28ce376b31b339ba0 (diff)
downloadphp-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.c2
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;