tony2001                Thu Feb  5 03:30:18 2004 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src/ext/oci8   oci8.c 
  Log:
  MFH:
  fix bug #27149
  
  
  
http://cvs.php.net/diff.php/php-src/ext/oci8/oci8.c?r1=1.183.2.11&r2=1.183.2.12&ty=u
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.183.2.11 php-src/ext/oci8/oci8.c:1.183.2.12
--- php-src/ext/oci8/oci8.c:1.183.2.11  Tue Feb  3 09:22:34 2004
+++ php-src/ext/oci8/oci8.c     Thu Feb  5 03:30:17 2004
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: oci8.c,v 1.183.2.11 2004/02/03 14:22:34 tony2001 Exp $ */
+/* $Id: oci8.c,v 1.183.2.12 2004/02/05 08:30:17 tony2001 Exp $ */
 
 /* TODO list:
  *
@@ -641,7 +641,7 @@
 
        php_info_print_table_start();
        php_info_print_table_row(2, "OCI8 Support", "enabled");
-       php_info_print_table_row(2, "Revision", "$Revision: 1.183.2.11 $");
+       php_info_print_table_row(2, "Revision", "$Revision: 1.183.2.12 $");
 #ifndef PHP_WIN32
        php_info_print_table_row(2, "Oracle Version", PHP_OCI8_VERSION );
        php_info_print_table_row(2, "Compile-time ORACLE_HOME", PHP_OCI8_DIR );
@@ -3118,11 +3118,11 @@
 
                        if (offparam == -1) {
                                offset = curloblen;
-                       } else if (offparam >= curloblen) {
+                       } else if ((ub4)offparam >= curloblen) {
                                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset is 
bigger than current LOB-Size - appending");
                                offset = curloblen;
                        } else {
-                               offset = offparam;
+                               offset = (ub4)offparam;
                        }
                } else if (zend_get_parameters_ex(1, &arg) == FAILURE) {
                        WRONG_PARAM_COUNT;
@@ -3136,6 +3136,10 @@
                        RETURN_FALSE;
                }
 
+               if (offset <= 0) {
+                       offset = 1;
+               }
+               
                CALL_OCI_RETURN(connection->error, OCILobWrite(
                                        connection->pServiceContext, 
                                        connection->pError,

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

Reply via email to