thekid          Wed Mar 14 11:48:49 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/sybase_ct      php_sybase_ct.c 
  Log:
  - Fixed segmentation fault in sybase_connect()
  # This was introduced by changing sprintf -> spprintf and resulted
  # from passing a char* to spprintf() instead of a char**
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/sybase_ct/php_sybase_ct.c?r1=1.103.2.5.2.10&r2=1.103.2.5.2.11&diff_format=u
Index: php-src/ext/sybase_ct/php_sybase_ct.c
diff -u php-src/ext/sybase_ct/php_sybase_ct.c:1.103.2.5.2.10 
php-src/ext/sybase_ct/php_sybase_ct.c:1.103.2.5.2.11
--- php-src/ext/sybase_ct/php_sybase_ct.c:1.103.2.5.2.10        Tue Mar  6 
02:07:10 2007
+++ php-src/ext/sybase_ct/php_sybase_ct.c       Wed Mar 14 11:48:49 2007
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_sybase_ct.c,v 1.103.2.5.2.10 2007/03/06 02:07:10 stas Exp $ */
+/* $Id: php_sybase_ct.c,v 1.103.2.5.2.11 2007/03/14 11:48:49 thekid Exp $ */
 
 
 #ifdef HAVE_CONFIG_H
@@ -599,7 +599,7 @@
                                convert_to_string_ex(yyhost);
                                host = Z_STRVAL_PP(yyhost);
                                user=passwd=charset=appname=NULL;
-                               hashed_details_length = 
spprintf(hashed_details, 0, "sybase_%s____", Z_STRVAL_PP(yyhost));
+                               hashed_details_length = 
spprintf(&hashed_details, 0, "sybase_%s____", Z_STRVAL_PP(yyhost));
                        }
                        break;
                case 2: {
@@ -613,7 +613,7 @@
                                host = Z_STRVAL_PP(yyhost);
                                user = Z_STRVAL_PP(yyuser);
                                passwd=charset=appname=NULL;
-                               hashed_details_length = 
spprintf(hashed_details, 0, "sybase_%s_%s___", Z_STRVAL_PP(yyhost), 
Z_STRVAL_PP(yyuser));
+                               hashed_details_length = 
spprintf(&hashed_details, 0, "sybase_%s_%s___", Z_STRVAL_PP(yyhost), 
Z_STRVAL_PP(yyuser));
                        }
                        break;
                case 3: {
@@ -629,7 +629,7 @@
                                user = Z_STRVAL_PP(yyuser);
                                passwd = Z_STRVAL_PP(yypasswd);
                                charset=appname=NULL;
-                               hashed_details_length = 
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: {
@@ -647,7 +647,7 @@
                                passwd = Z_STRVAL_PP(yypasswd);
                                charset = Z_STRVAL_PP(yycharset);
                                appname=NULL;
-                               hashed_details_length = 
spprintf(hashed_details, 0, "sybase_%s_%s_%s_%s_", Z_STRVAL_PP(yyhost), 
Z_STRVAL_PP(yyuser), Z_STRVAL_PP(yypasswd), Z_STRVAL_PP(yycharset));
+                               hashed_details_length = 
spprintf(&hashed_details, 0, "sybase_%s_%s_%s_%s_", Z_STRVAL_PP(yyhost), 
Z_STRVAL_PP(yyuser), Z_STRVAL_PP(yypasswd), Z_STRVAL_PP(yycharset));
                        }
                        break;
                case 5: {
@@ -666,7 +666,7 @@
                                passwd = Z_STRVAL_PP(yypasswd);
                                charset = Z_STRVAL_PP(yycharset);
                                appname = Z_STRVAL_PP(yyappname);
-                               hashed_details_length = 
spprintf(hashed_details, 0, "sybase_%s_%s_%s_%s_%s", Z_STRVAL_PP(yyhost), 
Z_STRVAL_PP(yyuser), Z_STRVAL_PP(yypasswd), Z_STRVAL_PP(yycharset), 
Z_STRVAL_PP(yyappname));
+                               hashed_details_length = 
spprintf(&hashed_details, 0, "sybase_%s_%s_%s_%s_%s", Z_STRVAL_PP(yyhost), 
Z_STRVAL_PP(yyuser), Z_STRVAL_PP(yypasswd), Z_STRVAL_PP(yycharset), 
Z_STRVAL_PP(yyappname));
                        }
                        break;
                default:

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to