tony2001 Thu Feb 5 03:29:17 2004 EDT Modified files: /php-src/ext/oci8 oci8.c Log: fix bug #27149 (offset should start with 1) http://cvs.php.net/diff.php/php-src/ext/oci8/oci8.c?r1=1.247&r2=1.248&ty=u Index: php-src/ext/oci8/oci8.c diff -u php-src/ext/oci8/oci8.c:1.247 php-src/ext/oci8/oci8.c:1.248 --- php-src/ext/oci8/oci8.c:1.247 Tue Feb 3 09:21:09 2004 +++ php-src/ext/oci8/oci8.c Thu Feb 5 03:29:16 2004 @@ -22,7 +22,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci8.c,v 1.247 2004/02/03 14:21:09 tony2001 Exp $ */ +/* $Id: oci8.c,v 1.248 2004/02/05 08:29:16 tony2001 Exp $ */ /* TODO list: * @@ -786,7 +786,7 @@ php_info_print_table_start(); php_info_print_table_row(2, "OCI8 Support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.247 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.248 $"); sprintf(buf, "%ld", num_persistent); php_info_print_table_row(2, "Active Persistent Links", buf); @@ -3841,11 +3841,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; @@ -3859,6 +3859,10 @@ RETURN_FALSE; } + if (offset <= 0) { + offset = 1; + } + CALL_OCI_RETURN(connection->error, OCILobWrite( connection->pServiceContext,
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php