mirror of
https://github.com/php/php-src.git
synced 2025-08-20 01:14:28 +02:00
Limit connection strings to 255 chars here
This commit is contained in:
parent
fc299cb1ab
commit
6b58d80b69
1 changed files with 11 additions and 0 deletions
|
@ -550,6 +550,17 @@ static void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Limit strings to 255 chars to prevent overflow issues in underlying libraries */
|
||||||
|
if(host_len>255) {
|
||||||
|
host[255] = '\0';
|
||||||
|
}
|
||||||
|
if(user_len>255) {
|
||||||
|
user[255] = '\0';
|
||||||
|
}
|
||||||
|
if(passwd_len>255) {
|
||||||
|
passwd[255] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
switch(ZEND_NUM_ARGS())
|
switch(ZEND_NUM_ARGS())
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue