From b29b59dcd2948787695ccd0f1ff7d99750304ebb Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Fri, 10 Aug 2007 00:43:50 +0000 Subject: [PATCH] Fixed bug #42242 (sybase_connect() crashes) --- NEWS | 1 + ext/sybase/php_sybase_db.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 482e93f53c..059c2d50fa 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ PHP NEWS - Fixed bug #42247 (ldap_parse_result() not defined under win32). (Jani) - Fixed bug #42243 (copy() does not ouput an error when the first arg is a dir). (Ilia) +- Fixed bug #42242 (sybase_connect() crashes). (Ilia) - Fixed bug #42237 (stream_copy_to_stream returns invalid values for mmaped streams). (andrew dot minerd at sellingsource dot com, Ilia) - Fixed bug #42233 (Problems with æøå in extract()). (Jani) diff --git a/ext/sybase/php_sybase_db.c b/ext/sybase/php_sybase_db.c index 1f6bdfd5b4..467f256acc 100644 --- a/ext/sybase/php_sybase_db.c +++ b/ext/sybase/php_sybase_db.c @@ -355,7 +355,7 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent) host = Z_STRVAL_PP(yyhost); user = Z_STRVAL_PP(yyuser); passwd = Z_STRVAL_PP(yypasswd); - spprintf(&hashed_details, 0, "sybase_%s_%s_%s__", Z_STRVAL_PP(yyhost), Z_STRVAL_PP(yyuser), Z_STRVAL_PP(yypasswd)); + hashed_details_length = spprintf(&hashed_details, 0, "sybase_%s_%s_%s__", Z_STRVAL_PP(yyhost), Z_STRVAL_PP(yyuser), Z_STRVAL_PP(yypasswd)); } break; case 4: { -- 2.50.1