1
0
mirror of https://github.com/php/php-src.git synced 2026-04-09 09:03:04 +02:00

appling patch for joey since he has no ODBC karma. this is for bug #10252

This commit is contained in:
Dan Kalowsky
2001-04-19 19:55:05 +00:00
parent 02af513c0d
commit d7383e3255

View File

@@ -1929,6 +1929,7 @@ int odbc_sqlconnect(odbc_connection **conn, char *db, char *uid, char *pwd, int
char dsnbuf[300];
short dsnbuflen;
char *ldb = 0;
int ldb_len = 0;
if (strstr((char*)db, ";")) {
direct = 1;
@@ -1937,8 +1938,9 @@ int odbc_sqlconnect(odbc_connection **conn, char *db, char *uid, char *pwd, int
ldb = (char*)emalloc(strlen(db) + strlen(uid) + strlen(pwd) + 12);
sprintf(ldb, "%s;UID=%s;PWD=%s", db, uid, pwd);
} else {
ldb = (char*)emalloc(strlen(db) + 1);
strcat(ldb, db);
ldb_len = (strlen(db)+1);
ldb = (char*)emalloc(ldb_len);
strlcpy(ldb, db, ldb_len);
}
}