[ruby-oci8-commit] [372] trunk/ruby-oci8: * ext/oci8/object.c: fix segv when binding a collection of string.

nobody at rubyforge.org nobody at rubyforge.org
Mon Nov 2 20:55:50 EST 2009


Revision: 372
Author:   kubo
Date:     2009-11-02 20:55:50 -0500 (Mon, 02 Nov 2009)

Log Message:
-----------
* ext/oci8/object.c: fix segv when binding a collection of string.
    (reported by Raimonds Simanovskis)

Modified Paths:
--------------
    trunk/ruby-oci8/ChangeLog
    trunk/ruby-oci8/ext/oci8/object.c

Modified: trunk/ruby-oci8/ChangeLog
===================================================================
--- trunk/ruby-oci8/ChangeLog	2009-10-26 14:58:14 UTC (rev 371)
+++ trunk/ruby-oci8/ChangeLog	2009-11-03 01:55:50 UTC (rev 372)
@@ -1,3 +1,7 @@
+2009-11-03  KUBO Takehiro  <kubo at jiubao.org>
+	* ext/oci8/object.c: fix segv when binding a collection of string.
+	    (reported by Raimonds Simanovskis)
+
 2009-10-26  KUBO Takehiro  <kubo at jiubao.org>
 	* NEW: fix typo.
 	* dist-files, ext/oci8/.document: add ocihandle.c.

Modified: trunk/ruby-oci8/ext/oci8/object.c
===================================================================
--- trunk/ruby-oci8/ext/oci8/object.c	2009-10-26 14:58:14 UTC (rev 371)
+++ trunk/ruby-oci8/ext/oci8/object.c	2009-11-03 01:55:50 UTC (rev 372)
@@ -300,11 +300,11 @@
     switch (FIX2INT(datatype)) {
     case ATTR_STRING:
         oci_lc(OCIObjectNew(oci8_envhp, oci8_errhp, svcctx->hp.svc, OCI_TYPECODE_VARCHAR2, NULL, NULL, OCI_DURATION_SESSION, TRUE, &cb_data.data.ptr));
-        oci_lc(OCIObjectGetInd(oci8_envhp, oci8_errhp, cb_data.data.ptr, (dvoid**)&cb_data.indp));
+        cb_data.indp = &cb_data.ind;
         break;
     case ATTR_RAW:
         oci_lc(OCIObjectNew(oci8_envhp, oci8_errhp, svcctx->hp.svc, OCI_TYPECODE_RAW, NULL, NULL, OCI_DURATION_SESSION, TRUE, &cb_data.data.ptr));
-        oci_lc(OCIObjectGetInd(oci8_envhp, oci8_errhp, cb_data.data.ptr, (dvoid**)&cb_data.indp));
+        cb_data.indp = &cb_data.ind;
         break;
     case ATTR_OCINUMBER:
     case ATTR_FLOAT:




More information about the ruby-oci8-commit mailing list