summaryrefslogtreecommitdiff
path: root/ext/odbc
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-12-28 14:26:36 +0000
committerAntony Dovgal <tony2001@php.net>2006-12-28 14:26:36 +0000
commitef9646c8670f14287c9a09140786689ed7145dd1 (patch)
treed36536708034d34888a455291cdc8452d98a9593 /ext/odbc
parentfdfa4033883231e3f9327c66b78e0f30046d67ec (diff)
downloadphp-git-ef9646c8670f14287c9a09140786689ed7145dd1.tar.gz
MFH
Diffstat (limited to 'ext/odbc')
-rw-r--r--ext/odbc/php_odbc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index 0b7cee68e4..d92c1b63bb 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -2090,23 +2090,23 @@ int odbc_sqlconnect(odbc_connection **conn, char *db, char *uid, char *pwd, int
if (strstr(db, "pwd") || strstr(db, "PWD")) {
pwd = NULL;
}
- strncpy( lpszConnStr, db, CONNSTRSIZE);
+ strlcpy( lpszConnStr, db, CONNSTRSIZE);
}
else {
strcpy(lpszConnStr, "DSN=");
- strcat(lpszConnStr, db);
+ strlcat(lpszConnStr, db, CONNSTRSIZE);
}
if (uid) {
if (uid[0]) {
- strcat(lpszConnStr, ";UID=");
- strcat(lpszConnStr, uid);
- strcat(lpszConnStr, ";");
+ strlcat(lpszConnStr, ";UID=", CONNSTRSIZE);
+ strlcat(lpszConnStr, uid, CONNSTRSIZE);
+ strlcat(lpszConnStr, ";", CONNSTRSIZE);
}
if (pwd) {
if (pwd[0]) {
- strcat(lpszConnStr, "PWD=");
- strcat(lpszConnStr, pwd);
- strcat(lpszConnStr, ";");
+ strlcat(lpszConnStr, "PWD=", CONNSTRSIZE);
+ strlcat(lpszConnStr, pwd, CONNSTRSIZE);
+ strlcat(lpszConnStr, ";", CONNSTRSIZE);
}
}
}