diff options
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: |