php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #52843
Patch mssql_fix_segfault revision 2010-09-14 20:57 UTC by clint at ubuntu dot com

Patch mssql_fix_segfault for MSSQL related Bug #52843

Patch version 2010-09-14 20:57 UTC

Return to Bug #52843 | Download this patch
Patch Revisions:

Developer: clint@ubuntu.com

--- a/ext/mssql/php_mssql.c
+++ b/ext/mssql/php_mssql.c
@@ -551,13 +551,13 @@
 	}
 
 	/* Limit strings to 255 chars to prevent overflow issues in underlying libraries */
-	if(host_len>255) {
+	if(host && host_len>255) {
 		host[255] = '\0';
 	}
-	if(user_len>255) {
+	if(user && user_len>255) {
 		user[255] = '\0';
 	}
-	if(passwd_len>255) {
+	if(passwd && passwd_len>255) {
 		passwd[255] = '\0';
 	}
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 06:01:30 2024 UTC