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/msql/php_msql.c | |
parent | 10ffce328593ddda1fb31482ec5d19ce6e02556d (diff) | |
download | php-git-20a40063c51b20c1ea5f48c109b69fea3964b446.tar.gz |
- avoid sprintf
Diffstat (limited to 'ext/msql/php_msql.c')
-rw-r--r-- | ext/msql/php_msql.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/msql/php_msql.c b/ext/msql/php_msql.c index 6339bcd6d6..e8d59838f9 100644 --- a/ext/msql/php_msql.c +++ b/ext/msql/php_msql.c @@ -250,9 +250,7 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent) } convert_to_string(yyhost); host = Z_STRVAL_P(yyhost); - hashed_details_length = Z_STRLEN_P(yyhost)+4+1; - hashed_details = emalloc(hashed_details_length+1); - sprintf(hashed_details,"msql_%s",Z_STRVAL_P(yyhost)); /* SAFE */ + hashed_details_length = spprintf(&hashed_details, 0, "msql_%s",Z_STRVAL_P(yyhost)); } break; default: |