From 5ca4b8383e46621ee6fefdee849cbe60cbbbb1ea Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Thu, 28 Apr 2005 14:10:42 +0000 Subject: [PATCH] handle unsupported datatype (OCIBindByName segfaults somewhere in OCI lib when unknown type is provided) --- ext/oci8/oci8.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 33132960df..8921cc1496 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -3694,6 +3694,10 @@ break; } value_sz = sizeof(void*); break; + default: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown or unsupported datatype given: %u", ocitype); + RETURN_FALSE; + break; } if ((ocitype == SQLT_CHR) && (value_sz == -1)) { -- 2.50.1