[PHP-CVS] cvs: php4 /ext/standard/tests/strings implode.phpt
derick Sat Oct 19 15:17:14 2002 EDT Modified files: /php4/ext/standard/tests/stringsimplode.phpt Log: - Hopefully fix test file problems Index: php4/ext/standard/tests/strings/implode.phpt diff -u php4/ext/standard/tests/strings/implode.phpt:1.2 php4/ext/standard/tests/strings/implode.phpt:1.3 --- php4/ext/standard/tests/strings/implode.phpt:1.2Tue Oct 8 03:55:02 2002 +++ php4/ext/standard/tests/strings/implode.phptSat Oct 19 15:17:13 2002 @@ -4,6 +4,7 @@ --GET-- --INI-- error_reporting=2047 +log_errors=0 --FILE-- http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/dio dio.c
iliaa Sat Oct 19 13:13:14 2002 EDT Modified files: /php4/ext/dio dio.c Log: Silence compile warning. Index: php4/ext/dio/dio.c diff -u php4/ext/dio/dio.c:1.19 php4/ext/dio/dio.c:1.20 --- php4/ext/dio/dio.c:1.19 Fri Aug 16 11:45:22 2002 +++ php4/ext/dio/dio.c Sat Oct 19 13:13:14 2002 @@ -418,7 +418,6 @@ zval *r_fd; zval *arg = NULL; php_fd_t *f; - int cmd; struct termios newtio; int Baud_Rate, Data_Bits=8, Stop_Bits=1, Parity=0; long BAUD,DATABITS,STOPBITS,PARITYON,PARITY; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /main network.c
iliaa Sat Oct 19 13:05:09 2002 EDT Modified files: /php4/main network.c Log: Silence compile warning, when compiling --with-openssl. Index: php4/main/network.c diff -u php4/main/network.c:1.81 php4/main/network.c:1.82 --- php4/main/network.c:1.81Sat Oct 19 12:50:07 2002 +++ php4/main/network.c Sat Oct 19 13:05:08 2002 @@ -16,7 +16,7 @@ | Streams work by Wez Furlong <[EMAIL PROTECTED]> | +--+ */ -/* $Id: network.c,v 1.81 2002/10/19 16:50:07 iliaa Exp $ */ +/* $Id: network.c,v 1.82 2002/10/19 17:05:08 iliaa Exp $ */ /*#define DEBUG_MAIN_NETWORK 1*/ @@ -47,6 +47,10 @@ #ifndef _FCNTL_H #include +#endif + +#ifdef HAVE_OPENSSL_EXT +#include #endif #ifdef HAVE_SYS_SELECT_H -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /main network.c
iliaa Sat Oct 19 12:50:07 2002 EDT Modified files: /php4/main network.c Log: Fixed a typo. Index: php4/main/network.c diff -u php4/main/network.c:1.80 php4/main/network.c:1.81 --- php4/main/network.c:1.80Fri Oct 18 13:14:32 2002 +++ php4/main/network.c Sat Oct 19 12:50:07 2002 @@ -16,7 +16,7 @@ | Streams work by Wez Furlong <[EMAIL PROTECTED]> | +--+ */ -/* $Id: network.c,v 1.80 2002/10/18 17:14:32 wez Exp $ */ +/* $Id: network.c,v 1.81 2002/10/19 16:50:07 iliaa Exp $ */ /*#define DEBUG_MAIN_NETWORK 1*/ @@ -802,8 +802,9 @@ esbuf[code] = '\0'; ebuf = erealloc(ebuf, ebuf_size + code + 1); - if (wptr = NULL) + if (wptr == NULL) { wptr = ebuf; + } /* also copies the NUL */ memcpy(wptr, esbuf, code + 1); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/oci8 oci8.c
maxim Sat Oct 19 12:11:16 2002 EDT Modified files: /php4/ext/oci8 oci8.c Log: a silly comment typo Index: php4/ext/oci8/oci8.c diff -u php4/ext/oci8/oci8.c:1.178 php4/ext/oci8/oci8.c:1.179 --- php4/ext/oci8/oci8.c:1.178 Sat Oct 19 11:51:04 2002 +++ php4/ext/oci8/oci8.cSat Oct 19 12:11:16 2002 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: oci8.c,v 1.178 2002/10/19 15:51:04 maxim Exp $ */ +/* $Id: oci8.c,v 1.179 2002/10/19 16:11:16 maxim Exp $ */ /* TODO list: * @@ -631,7 +631,7 @@ php_info_print_table_start(); php_info_print_table_row(2, "OCI8 Support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.178 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.179 $"); #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 ); @@ -1767,7 +1767,7 @@ if ((statement->error == OCI_NO_DATA) || (nrows == 0)) { if (statement->last_query == 0) { - /* reset define-list for refcursosrs */ + /* reset define-list for refcursors */ if (statement->columns) { zend_hash_destroy(statement->columns); efree(statement->columns); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/oci8 oci8.c
maxim Sat Oct 19 11:51:04 2002 EDT Modified files: /php4/ext/oci8 oci8.c Log: - fixed proto for OciBindByName to represent the forth parameter optional Index: php4/ext/oci8/oci8.c diff -u php4/ext/oci8/oci8.c:1.177 php4/ext/oci8/oci8.c:1.178 --- php4/ext/oci8/oci8.c:1.177 Thu Oct 17 04:09:31 2002 +++ php4/ext/oci8/oci8.cSat Oct 19 11:51:04 2002 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: oci8.c,v 1.177 2002/10/17 08:09:31 thies Exp $ */ +/* $Id: oci8.c,v 1.178 2002/10/19 15:51:04 maxim Exp $ */ /* TODO list: * @@ -631,7 +631,7 @@ php_info_print_table_start(); php_info_print_table_row(2, "OCI8 Support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.177 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.178 $"); #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 ); @@ -2765,7 +2765,7 @@ /* }}} */ -/* {{{ proto int ocibindbyname(int stmt, string name, mixed &var, int maxlength [, int type]) +/* {{{ proto int ocibindbyname(int stmt, string name, mixed &var, [, int maxlength] +[, int type]) Bind a PHP variable to an Oracle placeholder by name */ /* if you want to bind a LOB/CLOB etc make sure you allocate it via OCINewDescriptor BEFORE binding!!! */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/gd config.m4
sniper Sat Oct 19 09:27:54 2002 EDT Modified files: /php4/ext/gdconfig.m4 Log: --with-zlib-dir has to be defined here to enable phpize build Index: php4/ext/gd/config.m4 diff -u php4/ext/gd/config.m4:1.115 php4/ext/gd/config.m4:1.116 --- php4/ext/gd/config.m4:1.115 Sun Oct 6 02:03:16 2002 +++ php4/ext/gd/config.m4 Sat Oct 19 09:27:53 2002 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.115 2002/10/06 06:03:16 rasmus Exp $ +dnl $Id: config.m4,v 1.116 2002/10/19 13:27:53 sniper Exp $ dnl dnl @@ -14,6 +14,9 @@ PHP_ARG_WITH(png-dir, for the location of libpng, [ --with-png-dir=DIRGD: Set the path to libpng install prefix.], no, no) + +PHP_ARG_WITH(zlib-dir, for the location of libz, +[ --with-zlib-dir[=DIR] GD: Set the path to libz install prefix.], no, no) PHP_ARG_WITH(xpm-dir, for the location of libXpm, [ --with-xpm-dir=DIRGD: Set the path to libXpm install prefix.], no, no) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard file.c /main php_streams.h streams.c
wez Sat Oct 19 09:11:48 2002 EDT Modified files: /php4/main streams.c php_streams.h /php4/ext/standard file.c Log: made fgets() binary safe. php_stream_gets is now a macro which calls php_stream_get_line. The latter has an option argument to return the number of bytes in the line. Functions like fgetcsv(), fgetss() can be made binary safe by calling php_stream_get_line directly. # HEADS UP: You will need to make clean after updating your CVS, as the # binary signature has changed. Index: php4/main/streams.c diff -u php4/main/streams.c:1.111 php4/main/streams.c:1.112 --- php4/main/streams.c:1.111 Sat Oct 19 06:34:10 2002 +++ php4/main/streams.c Sat Oct 19 09:11:48 2002 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: streams.c,v 1.111 2002/10/19 10:34:10 wez Exp $ */ +/* $Id: streams.c,v 1.112 2002/10/19 13:11:48 wez Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -668,7 +668,8 @@ /* If buf == NULL, the buffer will be allocated automatically and will be of an * appropriate length to hold the line, regardless of the line length, memory * permitting */ -PHPAPI char *_php_stream_gets(php_stream *stream, char *buf, size_t maxlen TSRMLS_DC) +PHPAPI char *_php_stream_get_line(php_stream *stream, char *buf, size_t maxlen, + size_t *returned_len TSRMLS_DC) { size_t avail = 0; size_t current_buf_size = 0; @@ -772,6 +773,8 @@ } buf[0] = '\0'; + if (returned_len) + *returned_len = total_copied; return bufstart; } Index: php4/main/php_streams.h diff -u php4/main/php_streams.h:1.55 php4/main/php_streams.h:1.56 --- php4/main/php_streams.h:1.55Fri Oct 18 16:39:49 2002 +++ php4/main/php_streams.h Sat Oct 19 09:11:48 2002 @@ -359,8 +359,10 @@ PHPAPI int _php_stream_flush(php_stream *stream, int closing TSRMLS_DC); #define php_stream_flush(stream) _php_stream_flush((stream), 0 TSRMLS_CC) -PHPAPI char *_php_stream_gets(php_stream *stream, char *buf, size_t maxlen TSRMLS_DC); -#define php_stream_gets(stream, buf, maxlen) _php_stream_gets((stream), (buf), (maxlen) TSRMLS_CC) +PHPAPI char *_php_stream_get_line(php_stream *stream, char *buf, size_t maxlen, +size_t *returned_len TSRMLS_DC); +#define php_stream_gets(stream, buf, maxlen) _php_stream_get_line((stream), (buf), +(maxlen), NULL TSRMLS_CC) + +#define php_stream_get_line(stream, buf, maxlen, retlen) +_php_stream_get_line((stream), (buf), (maxlen), (retlen) TSRMLS_CC) /* CAREFUL! this is equivalent to puts NOT fputs! */ PHPAPI int _php_stream_puts(php_stream *stream, char *buf TSRMLS_DC); Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.272 php4/ext/standard/file.c:1.273 --- php4/ext/standard/file.c:1.272 Fri Oct 18 16:39:49 2002 +++ php4/ext/standard/file.cSat Oct 19 09:11:48 2002 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.272 2002/10/18 20:39:49 iliaa Exp $ */ +/* $Id: file.c,v 1.273 2002/10/19 13:11:48 wez Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1239,6 +1239,7 @@ int len; char *buf = NULL; int argc = ZEND_NUM_ARGS(); + size_t line_len = 0; php_stream *stream; if (argc<1 || argc>2 || zend_get_parameters_ex(argc, &arg1, &arg2) == FAILURE) { @@ -1249,7 +1250,7 @@ if (argc == 1) { /* ask streams to give us a buffer of an appropriate size */ - buf = php_stream_gets(stream, NULL, 0); + buf = php_stream_get_line(stream, NULL, 0, &line_len); if (buf == NULL) goto exit_failed; } else if (argc > 1) { @@ -1262,19 +1263,19 @@ } buf = ecalloc(len + 1, sizeof(char)); - if (php_stream_gets(stream, buf, len) == NULL) + if (php_stream_get_line(stream, buf, len, &line_len) == NULL) goto exit_failed; } if (PG(magic_quotes_runtime)) { - Z_STRVAL_P(return_value) = php_addslashes(buf, 0, &Z_STRLEN_P(return_value), 1 TSRMLS_CC); + Z_STRVAL_P(return_value) = php_addslashes(buf, line_len, +&Z_STRLEN_P(return_value), 1 TSRMLS_CC); Z_TYPE_P(return_value) = IS_STRING; } else { - ZVAL_STRING(return_value, buf, 0); + ZVAL_STRINGL(return_value, buf, line_len, 0); /* resize buffer if it's much larger than the result. * Only needed if the user requested a buffer size. */ if (argc > 1 && Z_STRLEN_P(return_value) < len / 2) { - Z_STRVAL_P(return_value) = erealloc(buf, Z_STRLEN_P(return_value) + 1); + Z_STRVAL_P(return_value) = erealloc(buf, line_len + 1); }
[PHP-CVS] cvs: php4 /ext/pgsql pgsql.c
derick Sat Oct 19 08:58:41 2002 EDT Modified files: /php4/ext/pgsql pgsql.c Log: - Style polizei =) Index: php4/ext/pgsql/pgsql.c diff -u php4/ext/pgsql/pgsql.c:1.240 php4/ext/pgsql/pgsql.c:1.241 --- php4/ext/pgsql/pgsql.c:1.240Sat Oct 19 02:05:16 2002 +++ php4/ext/pgsql/pgsql.c Sat Oct 19 08:58:41 2002 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.240 2002/10/19 06:05:16 yohgaki Exp $ */ +/* $Id: pgsql.c,v 1.241 2002/10/19 12:58:41 derick Exp $ */ #include @@ -71,7 +71,7 @@ #define PQ_SETNONBLOCKING(pg_link, flag) 0 #endif -#define CHECK_DEFAULT_LINK(x) if ((x) == -1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "No PostgreSQL link opened yet"); } +#define CHECK_DEFAULT_LINK(x) if ((x) == -1) { php_error_docref(NULL TSRMLS_CC, +E_WARNING, "No PostgreSQL link opened yet."); } /* {{{ pgsql_functions[] */ @@ -308,7 +308,7 @@ link = (PGconn *) rsrc->ptr; if (PQ_SETNONBLOCKING(link, 0)) { - php_error_docref("ref.pgsql" TSRMLS_CC, E_NOTICE, "Cannot set connection to blocking mode"); + php_error_docref("ref.pgsql" TSRMLS_CC, E_NOTICE, "Cannot set +connection to blocking mode."); return -1; } @@ -541,12 +541,12 @@ if (PGG(max_links)!=-1 && PGG(num_links)>=PGG(max_links)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, -"Cannot create new link. Too many open links (%d)", PGG(num_links)); +"Cannot create new +link. Too many open links (%d).", PGG(num_links)); goto err; } if (PGG(max_persistent)!=-1 && PGG(num_persistent)>=PGG(max_persistent)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, -"Cannot create new link. Too many open persistent links (%d)", PGG(num_persistent)); +"Cannot create new +link. Too many open persistent links (%d).", PGG(num_persistent)); goto err; } @@ -558,7 +558,7 @@ } if (pgsql==NULL || PQstatus(pgsql)==CONNECTION_BAD) { php_error_docref(NULL TSRMLS_CC, E_WARNING, -"Unable to connect to PostgreSQL server: %s", PQerrorMessage(pgsql)); +"Unable to connect to +PostgreSQL server: %s.", PQerrorMessage(pgsql)); if (pgsql) { PQfinish(pgsql); } @@ -597,7 +597,7 @@ PQreset(le->ptr); } if (le->ptr==NULL || PQstatus(le->ptr)==CONNECTION_BAD) { - php_error_docref(NULL TSRMLS_CC, E_WARNING,"PostgreSQL link lost, unable to reconnect"); + php_error_docref(NULL TSRMLS_CC, +E_WARNING,"PostgreSQL link lost, unable to reconnect."); zend_hash_del(&EG(persistent_list),str.c,str.len+1); goto err; } @@ -634,7 +634,7 @@ } } if (PGG(max_links)!=-1 && PGG(num_links)>=PGG(max_links)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot create new link. Too many open links (%d)", PGG(num_links)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot create new +link. Too many open links (%d).", PGG(num_links)); goto err; } if (connstring) { @@ -643,7 +643,7 @@ pgsql = PQsetdb(host,port,options,tty,dbname); } if (pgsql==NULL || PQstatus(pgsql)==CONNECTION_BAD) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to connect to PostgreSQL server: %s", PQerrorMessage(pgsql)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to connect +to PostgreSQL server: %s.", PQerrorMessage(pgsql)); goto err; } @@ -918,7 +918,7 @@ convert_to_string_ex(query); if (PQ_SETNONBLOCKING(pgsql, 0)) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE,"Cannot set connection to blocking mode"); + php_error_docref(NULL TSRMLS_CC, E_NOTICE,"Cannot set connection to +bloc
Re: [PHP-CVS] cvs: php4 /main streams.c
Nope. The problem was that size_t is unsigned, but -1 is signed. --Wez. On 10/19/02, "Sander Roobol" <[EMAIL PROTECTED]> wrote: > On Sat, Oct 19, 2002 at 10:34:10AM -, Wez Furlong wrote: > > - if (justread > 0) { > > + if (justread != (size_t)-1) { > > Shouldn't that be someting like this? > >>> if (justread != sizeof(size_t)-1) { > > Sander > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /main streams.c
On Sat, Oct 19, 2002 at 10:34:10AM -, Wez Furlong wrote: > - if (justread > 0) { > + if (justread != (size_t)-1) { Shouldn't that be someting like this? >>> if (justread != sizeof(size_t)-1) { Sander -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /main streams.c
wez Sat Oct 19 06:34:10 2002 EDT Modified files: /php4/main streams.c Log: Probable fix for #19944 Index: php4/main/streams.c diff -u php4/main/streams.c:1.110 php4/main/streams.c:1.111 --- php4/main/streams.c:1.110 Fri Oct 18 16:39:49 2002 +++ php4/main/streams.c Sat Oct 19 06:34:10 2002 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: streams.c,v 1.110 2002/10/18 20:39:49 iliaa Exp $ */ +/* $Id: streams.c,v 1.111 2002/10/19 10:34:10 wez Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -495,7 +495,7 @@ TSRMLS_CC); } - if (justread > 0) { + if (justread != (size_t)-1) { stream->writepos += justread; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/exif exif.c /ext/exif/tests 005.phpt test5.jpg
helly Sat Oct 19 06:24:04 2002 EDT Added files: (Branch: PHP_4_2_0) /php4/ext/exif/tests005.phpt test5.jpg Modified files: /php4/ext/exif exif.c Log: MFH: Allow ifd start at offset other than 0008h and provide testcase. Index: php4/ext/exif/exif.c diff -u php4/ext/exif/exif.c:1.52.2.12 php4/ext/exif/exif.c:1.52.2.13 --- php4/ext/exif/exif.c:1.52.2.12 Tue Sep 3 15:09:03 2002 +++ php4/ext/exif/exif.cSat Oct 19 06:24:03 2002 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.52.2.12 2002/09/03 19:09:03 helly Exp $ */ +/* $Id: exif.c,v 1.52.2.13 2002/10/19 10:24:03 helly Exp $ */ /* ToDos * @@ -1606,6 +1606,8 @@ */ static void exif_process_TIFF_in_JPEG(image_info_type *ImageInfo, char *CharBuf, unsigned int length) { + unsigned exif_value_2a, offset_of_ifd; + /* set the thumbnail stuff to nothing so we can test to see if they get set up */ if (memcmp(CharBuf, "II", 2) == 0) { ImageInfo->motorola_intel = 0; @@ -1617,14 +1619,15 @@ } /* Check the next two values for correctness. */ - if (php_ifd_get16u(CharBuf+2, ImageInfo->motorola_intel) != 0x2a - || php_ifd_get32u(CharBuf+4, ImageInfo->motorola_intel) != 0x08) { + exif_value_2a = php_ifd_get16u(CharBuf+2, ImageInfo->motorola_intel); + offset_of_ifd = php_ifd_get32u(CharBuf+4, ImageInfo->motorola_intel); + if ( exif_value_2a != 0x2a || offset_of_ifd < 0x08) { php_error(E_WARNING, "Invalid TIFF start (1)"); return; } /* First directory starts at offset 8. Offsets starts at 0. */ - exif_process_IFD_in_JPEG(ImageInfo, CharBuf+8, CharBuf, length/*-14*/, SECTION_IFD0); + exif_process_IFD_in_JPEG(ImageInfo, CharBuf+offset_of_ifd, CharBuf, +length/*-14*/, SECTION_IFD0); #ifdef EXIF_DEBUG php_error(E_NOTICE,"exif_process_TIFF_in_JPEG, done"); Index: php4/ext/exif/tests/005.phpt +++ php4/ext/exif/tests/005.phpt --TEST-- Check for exif_read_data, unusual IFD start --SKIPIF-- --FILE-- --EXPECT-- array(2) { ["ImageDescription"]=> string(11) "Ifd0009" ["DateTime"]=> string(19) "2002:10:18 20:06:00" } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/exif exif.c /ext/exif/tests 005.phpt test5.jpg
helly Sat Oct 19 05:52:00 2002 EDT Added files: /php4/ext/exif/tests005.phpt test5.jpg Modified files: /php4/ext/exif exif.c Log: Allow ifd start at offset other than 0007h and provide testcase. #Now we can read images modified by Exifer. Index: php4/ext/exif/exif.c diff -u php4/ext/exif/exif.c:1.116 php4/ext/exif/exif.c:1.117 --- php4/ext/exif/exif.c:1.116 Thu Oct 3 06:44:13 2002 +++ php4/ext/exif/exif.cSat Oct 19 05:52:00 2002 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.116 2002/10/03 10:44:13 helly Exp $ */ +/* $Id: exif.c,v 1.117 2002/10/19 09:52:00 helly Exp $ */ /* ToDos * @@ -109,7 +109,7 @@ }; /* }}} */ -#define EXIF_VERSION "1.4 $Id: exif.c,v 1.116 2002/10/03 10:44:13 helly Exp $" +#define EXIF_VERSION "1.4 $Id: exif.c,v 1.117 2002/10/19 09:52:00 helly Exp $" /* {{{ PHP_MINFO_FUNCTION */ @@ -3078,6 +3078,8 @@ */ static void exif_process_TIFF_in_JPEG(image_info_type *ImageInfo, char *CharBuf, size_t length, size_t displacement TSRMLS_DC) { + unsigned exif_value_2a, offset_of_ifd; + /* set the thumbnail stuff to nothing so we can test to see if they get set up */ if (memcmp(CharBuf, "II", 2) == 0) { ImageInfo->motorola_intel = 0; @@ -3089,16 +3091,16 @@ } /* Check the next two values for correctness. */ - if (php_ifd_get16u(CharBuf+2, ImageInfo->motorola_intel) != 0x2a - || php_ifd_get32u(CharBuf+4, ImageInfo->motorola_intel) != 0x08 - ) { + exif_value_2a = php_ifd_get16u(CharBuf+2, ImageInfo->motorola_intel); + offset_of_ifd = php_ifd_get32u(CharBuf+4, ImageInfo->motorola_intel); + if ( exif_value_2a != 0x2a || offset_of_ifd < 0x08) { exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_WARNING, "invalid TIFF start (1)"); return; } ImageInfo->sections_found |= FOUND_IFD0; /* First directory starts at offset 8. Offsets starts at 0. */ - exif_process_IFD_in_JPEG(ImageInfo, CharBuf+8, CharBuf, length/*-14*/, displacement, SECTION_IFD0 TSRMLS_CC); + exif_process_IFD_in_JPEG(ImageInfo, CharBuf+offset_of_ifd, CharBuf, +length/*-14*/, displacement, SECTION_IFD0 TSRMLS_CC); #ifdef EXIF_DEBUG exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "process TIFF in JPEG done"); Index: php4/ext/exif/tests/005.phpt +++ php4/ext/exif/tests/005.phpt --TEST-- Check for exif_read_data, unusual IFD start --SKIPIF-- --FILE-- --EXPECT-- array(2) { ["ImageDescription"]=> string(11) "Ifd0009" ["DateTime"]=> string(19) "2002:10:18 20:06:00" } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/pgsql pgsql.c
yohgaki Sat Oct 19 00:01:27 2002 EDT Modified files: /php4/ext/pgsql pgsql.c Log: Fixed typo. Index: php4/ext/pgsql/pgsql.c diff -u php4/ext/pgsql/pgsql.c:1.237 php4/ext/pgsql/pgsql.c:1.238 --- php4/ext/pgsql/pgsql.c:1.237Thu Oct 17 19:41:34 2002 +++ php4/ext/pgsql/pgsql.c Sat Oct 19 00:01:27 2002 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.237 2002/10/17 23:41:34 yohgaki Exp $ */ +/* $Id: pgsql.c,v 1.238 2002/10/19 04:01:27 yohgaki Exp $ */ #include @@ -3919,7 +3919,7 @@ return; } if (option & ~PGSQL_CONV_OPTS) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid option is spedified"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid option is +specified"); RETURN_FALSE; } if (!table_name_len) { @@ -4078,7 +4078,7 @@ return; } if (option & ~(PGSQL_CONV_OPTS|PGSQL_DML_NO_CONV|PGSQL_DML_EXEC|PGSQL_DML_ASYNC|PGSQL_DML_STRING)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid option is spedified"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid option is +specified"); RETURN_FALSE; } @@ -4227,7 +4227,7 @@ return; } if (option & ~(PGSQL_CONV_OPTS|PGSQL_DML_NO_CONV|PGSQL_DML_EXEC|PGSQL_DML_STRING)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid option is spedified"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid option is +specified"); RETURN_FALSE; } @@ -4315,7 +4315,7 @@ return; } if (option & ~(PGSQL_CONV_FORCE_NULL|PGSQL_DML_NO_CONV|PGSQL_DML_EXEC|PGSQL_DML_STRING)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid option is spedified"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid option is +specified"); RETURN_FALSE; } @@ -4452,7 +4452,7 @@ return; } if (option & ~(PGSQL_CONV_FORCE_NULL|PGSQL_DML_NO_CONV|PGSQL_DML_EXEC|PGSQL_DML_ASYNC|PGSQL_DML_STRING)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid option is spedified"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid option is +specified"); RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/pgsql pgsql.c
yohgaki Sat Oct 19 00:46:19 2002 EDT Modified files: /php4/ext/pgsql pgsql.c Log: Skip field when there is obvious error. Fixed freeing of wrong zval. Index: php4/ext/pgsql/pgsql.c diff -u php4/ext/pgsql/pgsql.c:1.238 php4/ext/pgsql/pgsql.c:1.239 --- php4/ext/pgsql/pgsql.c:1.238Sat Oct 19 00:01:27 2002 +++ php4/ext/pgsql/pgsql.c Sat Oct 19 00:46:19 2002 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.238 2002/10/19 04:01:27 yohgaki Exp $ */ +/* $Id: pgsql.c,v 1.239 2002/10/19 04:46:19 yohgaki Exp $ */ #include @@ -3356,6 +3356,8 @@ zend_hash_get_current_data_ex(Z_ARRVAL_P(values), (void **)&val, &pos) == SUCCESS; zend_hash_move_forward_ex(Z_ARRVAL_P(values), &pos)) { skip_field = 0; + MAKE_STD_ZVAL(new_val); + if ((key_type = zend_hash_get_current_key_ex(Z_ARRVAL_P(values), &field, &field_len, &num_idx, 0, &pos)) == HASH_KEY_NON_EXISTANT) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to get array key type"); err = 1; @@ -3391,10 +3393,10 @@ err = 1; } if (err) { + skip_field = 1; /* prevent adding invalid feild */ break; } - MAKE_STD_ZVAL(new_val); switch(php_pgsql_get_data_type(Z_STRVAL_PP(type), Z_STRLEN_PP(type))) { case PG_BOOL: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php