diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-03-04 16:34:52 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-03-04 16:34:52 +0000 |
commit | c5053e0f621b989323f9094d4e4328e530bc9974 (patch) | |
tree | 813b961205203bf52e174485fbb3ea312d244656 | |
parent | 53530765ffe0538e3b8d40708d2dff4cdab62fb0 (diff) | |
download | php-git-c5053e0f621b989323f9094d4e4328e530bc9974.tar.gz |
Fixed bug #22437.
-rw-r--r-- | ext/odbc/php_odbc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index ba473e8911..4154608c43 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -2190,10 +2190,7 @@ void odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) persistent = 0; } - len = strlen(db) + strlen(uid) + strlen(pwd) + sizeof(ODBC_TYPE) + 5; - hashed_details = emalloc(len); - - hashed_len = sprintf(hashed_details, "%s_%s_%s_%s_%d", ODBC_TYPE, db, uid, pwd, cur_opt); + hashed_len = spprintf(hashed_details, 0, "%s_%s_%s_%s_%d", ODBC_TYPE, db, uid, pwd, cur_opt); /* FIXME the idea of checking to see if our connection is already persistent is good, but it adds a lot of overhead to non-persistent connections. We |