diff options
| author | Marcus Boerger <helly@php.net> | 2007-02-24 16:25:58 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2007-02-24 16:25:58 +0000 |
| commit | 20a40063c51b20c1ea5f48c109b69fea3964b446 (patch) | |
| tree | 24d6bf7894cc8080ff86f16eb5efef9da1cdf9c7 /ext/mysqli/mysqli_api.c | |
| parent | 10ffce328593ddda1fb31482ec5d19ce6e02556d (diff) | |
| download | php-git-20a40063c51b20c1ea5f48c109b69fea3964b446.tar.gz | |
- avoid sprintf
Diffstat (limited to 'ext/mysqli/mysqli_api.c')
| -rw-r--r-- | ext/mysqli/mysqli_api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 18afcc5b62..41ccff187b 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -751,7 +751,7 @@ PHP_FUNCTION(mysqli_stmt_fetch) * may be negative. Therefor we cannot use MYSQLI_LLU_SPEC and must * use MYSQLI_LL_SPEC. */ - sprintf((char *)&tmp, (stmt->stmt->fields[i].flags & UNSIGNED_FLAG)? MYSQLI_LLU_SPEC : MYSQLI_LL_SPEC, llval); + snprintf(tmp, sizeof(tmp), (stmt->stmt->fields[i].flags & UNSIGNED_FLAG)? MYSQLI_LLU_SPEC : MYSQLI_LL_SPEC, llval); ZVAL_UTF8_STRING(stmt->result.vars[i], tmp, ZSTR_DUPLICATE); } else { ZVAL_LONG(stmt->result.vars[i], llval); |
