|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-04-21 12:54 UTC] sniper@php.net
[2003-04-21 12:54 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 10:00:01 2026 UTC |
Due to uninitialized values of charsetid in _oci_open_session() and charset in oci_do_connect() a segfault occures when charset paramter is ommited in OCILogon(). Following patch can fix it: --- php-4.3.2RC1.orig/ext/oci8/oci8.c 2003-01-31 15:21:19.000000000 +0100 +++ php-4.3.2RC1/ext/oci8/oci8.c 2003-04-14 10:53:33.000000000 +0200 @@ -2154,7 +2154,7 @@ OCISvcCtx *svchp = 0; char *hashed_details; #ifdef HAVE_OCI9 - ub2 charsetid; + ub2 charsetid = 0; #endif TSRMLS_FETCH(); @@ -2218,10 +2218,11 @@ OCI(pEnv), charset)); - session->charsetId = charsetid; oci_debug("oci_do_connect: using charset id=%d",charsetid); } + session->charsetId = charsetid; + /* create an environment using the character set id, Oracle 9i+ ONLY */ CALL_OCI(OCIEnvNlsCreate( &session->pEnv, @@ -2648,6 +2649,7 @@ username = Z_STRVAL_PP(userParam); password = Z_STRVAL_PP(passParam); dbname = Z_STRVAL_PP(dbParam); + charset = ""; } else if (zend_get_parameters_ex(2, &userParam, &passParam) == SUCCESS) { convert_to_string_ex(userParam); convert_to_string_ex(passParam); @@ -2655,6 +2657,7 @@ username = Z_STRVAL_PP(userParam); password = Z_STRVAL_PP(passParam); dbname = ""; + charset = ""; } else { WRONG_PARAM_COUNT; }