diff options
author | Marcus Boerger <helly@php.net> | 2007-02-24 02:17:47 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2007-02-24 02:17:47 +0000 |
commit | 50ea26760da4e0fcf4980e739e1d0ed520de8d59 (patch) | |
tree | 888a32ce58864f5318a7f1072f8526c6a99212f9 /ext/fbsql | |
parent | 3e262bd36989898ac01224f0a987e79f44d25b31 (diff) | |
download | php-git-50ea26760da4e0fcf4980e739e1d0ed520de8d59.tar.gz |
- Avoid sprintf, even when checked copy'n'paste or changes lead to errors
Diffstat (limited to 'ext/fbsql')
-rw-r--r-- | ext/fbsql/php_fbsql.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/fbsql/php_fbsql.c b/ext/fbsql/php_fbsql.c index 27f11589ba..65ef8ed416 100644 --- a/ext/fbsql/php_fbsql.c +++ b/ext/fbsql/php_fbsql.c @@ -851,7 +851,7 @@ PHP_MINFO_FUNCTION(fbsql) php_info_print_table_row(2, "Active Links", buf); /* - sprintf(buf, "%ld", FB_SQL_G(resultCount)); + snprintf(buf, sizeof(buf), "%ld", FB_SQL_G(resultCount)); php_info_print_table_row(2, "Active Results", buf); */ @@ -2944,7 +2944,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng for (i = 0; i < nBits / 8; i++) { char c[4]; - sprintf(c, "%02x", ptr->bytes[i]); + snprintf(c, sizeof(c), "%02x", ptr->bytes[i]); r[i*2+2] = c[0]; r[i*2+3] = c[1]; } |