cvs: php4(PHP_4_3) /ext/odbc php_odbc.c
| From: | Ilia Alshanetsky | Date: | Tue, 04 Mar 2003 16:35:03 +0000 |
| Subject: | cvs: php4(PHP_4_3) /ext/odbc php_odbc.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-19360@lists.php.net to get a copy of this message | ||
iliaa Tue Mar 4 11:35:03 2003 EDT
Modified files: (Branch: PHP_4_3)
/php4/ext/odbc php_odbc.c
Log:
MFH
Index: php4/ext/odbc/php_odbc.c
diff -u php4/ext/odbc/php_odbc.c:1.143.2.4 php4/ext/odbc/php_odbc.c:1.143.2.5
--- php4/ext/odbc/php_odbc.c:1.143.2.4 Thu Feb 6 21:58:31 2003
+++ php4/ext/odbc/php_odbc.c Tue Mar 4 11:35:02 2003
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_odbc.c,v 1.143.2.4 2003/02/07 02:58:31 kalowsky Exp $ */
+/* $Id: php_odbc.c,v 1.143.2.5 2003/03/04 16:35:02 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -2220,15 +2220,7 @@
persistent = 0;
}
- len = strlen(db) + strlen(uid) + strlen(pwd) + sizeof(ODBC_TYPE) + 5;
- hashed_details = emalloc(len);
-
- if (hashed_details == NULL) {
- php_error(E_WARNING, "Out of memory");
- RETURN_FALSE;
- }
-
- 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