tony2001 Thu Dec 28 14:26:37 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/odbc php_odbc.c
Log:
MFH
http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/php_odbc.c?r1=1.189.2.4.2.1&r2=1.189.2.4.2.2&diff_format=u
Index: php-src/ext/odbc/php_odbc.c
diff -u php-src/ext/odbc/php_odbc.c:1.189.2.4.2.1
php-src/ext/odbc/php_odbc.c:1.189.2.4.2.2
--- php-src/ext/odbc/php_odbc.c:1.189.2.4.2.1 Thu Jun 15 18:33:08 2006
+++ php-src/ext/odbc/php_odbc.c Thu Dec 28 14:26:36 2006
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_odbc.c,v 1.189.2.4.2.1 2006/06/15 18:33:08 dmitry Exp $ */
+/* $Id: php_odbc.c,v 1.189.2.4.2.2 2006/12/28 14:26:36 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -2090,23 +2090,23 @@
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);
}
}
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php