Skip to content

Commit 09ca429

Browse files
committed
- Fixed bug #52843 (Segfault when optional parameters are not passed in to mssql_connect)
1 parent fc2143b commit 09ca429

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
- Fixed possible crash in mssql_fetch_batch(). (Kalle)
2222
- Fixed inconsistent backlog default value (-1) in FPM on many systems. (fat)
2323

24+
- Fixed bug #52843 (Segfault when optional parameters are not passed in to
25+
mssql_connect). (Felipe)
2426
- Fixed bug #52827 (cURL leaks handle and causes assertion error
2527
(CURLOPT_STDERR)). (Gustavo)
2628
- Fixed bug #52786 (PHP should reset section to [PHP] after ini sections).

ext/mssql/php_mssql.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ PHP_MINFO_FUNCTION(mssql)
539539
static void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
540540
{
541541
char *host = NULL, *user = NULL, *passwd = NULL;
542-
int host_len, user_len, passwd_len;
542+
int host_len = 0, user_len = 0, passwd_len = 0;
543543
zend_bool new_link = 0;
544544
char *hashed_details;
545545
int hashed_details_length;

0 commit comments

Comments
 (0)