[PHP-CVS] cvs: php-src /ext/exif exif.c
felipe Fri Jun 12 13:27:39 2009 UTC Modified files: /php-src/ext/exif exif.c Log: - Dropped unused var (HEAD only) http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.213r2=1.214diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.213 php-src/ext/exif/exif.c:1.214 --- php-src/ext/exif/exif.c:1.213 Thu May 28 13:44:43 2009 +++ php-src/ext/exif/exif.c Fri Jun 12 13:27:39 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.213 2009/05/28 13:44:43 pajoye Exp $ */ +/* $Id: exif.c,v 1.214 2009/06/12 13:27:39 felipe Exp $ */ /* ToDos * @@ -138,7 +138,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.213 2009/05/28 13:44:43 pajoye Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.214 2009/06/12 13:27:39 felipe Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -3888,7 +3888,7 @@ PHP_FUNCTION(exif_read_data) { zval **p_name; - int i, ac = ZEND_NUM_ARGS(), ret, sections_needed=0; + int i, ret, sections_needed=0; zend_bool sub_arrays=0, read_thumbnail=0, read_all=0; image_info_type ImageInfo; char tmp[64], *sections_str=0, *s; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
felipe Fri Jun 12 14:00:10 2009 UTC Modified files: /php-src/ext/exif exif.c Log: - Sync with 5_3 http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.214r2=1.215diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.214 php-src/ext/exif/exif.c:1.215 --- php-src/ext/exif/exif.c:1.214 Fri Jun 12 13:27:39 2009 +++ php-src/ext/exif/exif.c Fri Jun 12 14:00:10 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.214 2009/06/12 13:27:39 felipe Exp $ */ +/* $Id: exif.c,v 1.215 2009/06/12 14:00:10 felipe Exp $ */ /* ToDos * @@ -138,7 +138,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.214 2009/06/12 13:27:39 felipe Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.215 2009/06/12 14:00:10 felipe Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -3888,24 +3888,25 @@ PHP_FUNCTION(exif_read_data) { zval **p_name; - int i, ret, sections_needed=0; + int i, ret, sections_needed=0, p_sections_needed_len; zend_bool sub_arrays=0, read_thumbnail=0, read_all=0; image_info_type ImageInfo; - char tmp[64], *sections_str=0, *s; + char tmp[64], *sections_str = NULL, *p_sections_needed = NULL, *s; char *filename; int filename_len, sections_str_len = 0; - memset(ImageInfo, 0, sizeof(ImageInfo)); - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, Z|sbb, p_name, sections_str, sections_str_len, sub_arrays, read_thumbnail) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, Z|sbb, p_name, p_sections_needed, p_sections_needed_len, sub_arrays, read_thumbnail) == FAILURE) { return; } if (php_stream_path_param_encode(p_name, filename, filename_len, REPORT_ERRORS, FG(default_context)) == FAILURE) { return; } + + memset(ImageInfo, 0, sizeof(ImageInfo)); - if (sections_needed) { + if (p_sections_needed) { + spprintf(sections_str, 0, ,%s,, p_sections_needed); /* sections_str DOES start with , and SPACES are NOT allowed in names */ s = sections_str; while(*++s) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c /ext/exif/tests bug48378.jpeg bug48378.phpt
pajoye Thu May 28 13:44:43 2009 UTC Added files: /php-src/ext/exif/tests bug48378.jpeg bug48378.phpt Modified files: /php-src/ext/exif exif.c Log: #48378, exif_read_data() segfaults on certain corrupted .jpeg files http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.212r2=1.213diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.212 php-src/ext/exif/exif.c:1.213 --- php-src/ext/exif/exif.c:1.212 Tue May 19 10:23:51 2009 +++ php-src/ext/exif/exif.c Thu May 28 13:44:43 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.212 2009/05/19 10:23:51 kalle Exp $ */ +/* $Id: exif.c,v 1.213 2009/05/28 13:44:43 pajoye Exp $ */ /* ToDos * @@ -138,7 +138,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.212 2009/05/19 10:23:51 kalle Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.213 2009/05/28 13:44:43 pajoye Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -3188,6 +3188,10 @@ exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, Invalid TIFF start (1)); return; } + if (offset_of_ifd length) { + exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, Invalid IFD start); + return; + } ImageInfo-sections_found |= FOUND_IFD0; /* First directory starts at offset 8. Offsets starts at 0. */ http://cvs.php.net/viewvc.cgi/php-src/ext/exif/tests/bug48378.phpt?view=markuprev=1.1 Index: php-src/ext/exif/tests/bug48378.phpt +++ php-src/ext/exif/tests/bug48378.phpt --TEST-- Bug #48378 (Infinite recursion due to corrupt JPEG) --SKIPIF-- ?php if (!extension_loaded('exif')) print 'skip exif extension not available';? --FILE-- ?php exif_read_data( dirname(__FILE__) . /bug48378.jpeg, FILE,COMPUTED,ANY_TAG ); ? --EXPECTF-- Warning: exif_read_data(%s): Invalid IFD start in %s48378.php on line %d Warning: exif_read_data(%s): Error reading from file: got=x08B4(=2228) != itemlen-2=x1FFE(=8190) in %s48378.php on line %d Warning: exif_read_data(%s): Invalid JPEG file in %s48378.php on line %d -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
kalle Tue May 19 10:23:51 2009 UTC Modified files: /php-src/ext/exif exif.c Log: Fixed compiler warning http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.211r2=1.212diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.211 php-src/ext/exif/exif.c:1.212 --- php-src/ext/exif/exif.c:1.211 Tue Mar 10 23:39:17 2009 +++ php-src/ext/exif/exif.c Tue May 19 10:23:51 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.211 2009/03/10 23:39:17 helly Exp $ */ +/* $Id: exif.c,v 1.212 2009/05/19 10:23:51 kalle Exp $ */ /* ToDos * @@ -138,7 +138,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.211 2009/03/10 23:39:17 helly Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.212 2009/05/19 10:23:51 kalle Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -3883,7 +3883,7 @@ Reads header data from the JPEG/TIFF image filename and optionally reads the internal thumbnails */ PHP_FUNCTION(exif_read_data) { - zval **p_name, **p_read_all; + zval **p_name; int i, ac = ZEND_NUM_ARGS(), ret, sections_needed=0; zend_bool sub_arrays=0, read_thumbnail=0, read_all=0; image_info_type ImageInfo; @@ -3927,15 +3927,7 @@ #endif } - if(ac = 5) { - convert_to_long_ex(p_read_all); - read_all = Z_LVAL_PP(p_read_all); - } - /* parameters 3,4 will be working in later versions */ - read_all = 0; /* just to make function work for 4.2 tree */ - ret = exif_read_file(ImageInfo, filename, read_thumbnail, read_all TSRMLS_CC); - sections_str = exif_get_sectionlist(ImageInfo.sections_found TSRMLS_CC); #ifdef EXIF_DEBUG -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
janiSun Aug 3 12:10:51 2008 UTC Modified files: /php-src/ext/exif exif.c Log: - fix comment style http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.203r2=1.204diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.203 php-src/ext/exif/exif.c:1.204 --- php-src/ext/exif/exif.c:1.203 Mon Jul 14 10:47:35 2008 +++ php-src/ext/exif/exif.c Sun Aug 3 12:10:51 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.203 2008/07/14 10:47:35 tony2001 Exp $ */ +/* $Id: exif.c,v 1.204 2008/08/03 12:10:51 jani Exp $ */ /* ToDos * @@ -142,7 +142,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.203 2008/07/14 10:47:35 tony2001 Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.204 2008/08/03 12:10:51 jani Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -2838,11 +2838,9 @@ /* If its bigger than 4 bytes, the dir entry contains an offset. */ value_ptr = offset_base+offset_val; if (offset_val+byte_count IFDlength || value_ptr dir_entry) { - /* - // It is important to check for IMAGE_FILETYPE_TIFF - // JPEG does not use absolute pointers instead its pointers are relative to the start - // of the TIFF header in APP1 section. - */ + /* It is important to check for IMAGE_FILETYPE_TIFF +* JPEG does not use absolute pointers instead its pointers are +* relative to the start of the TIFF header in APP1 section. */ if (offset_val+byte_countImageInfo-FileSize || (ImageInfo-FileType!=IMAGE_FILETYPE_TIFF_II ImageInfo-FileType!=IMAGE_FILETYPE_TIFF_MM ImageInfo-FileType!=IMAGE_FILETYPE_JPEG)) { if (value_ptr dir_entry) { /* we can read this if offset_val 0 */ @@ -2860,13 +2858,11 @@ value_ptr = safe_emalloc(byte_count, 1, 0); outside = value_ptr; } else { - /* - // in most cases we only access a small range so - // it is faster to use a static buffer there - // BUT it offers also the possibility to have - // pointers read without the need to free them - // explicitley before returning. - */ + /* In most cases we only access a small range so +* it is faster to use a static buffer there +* BUT it offers also the possibility to have +* pointers read without the need to free them +* explicitley before returning. */ memset(cbuf, 0, sizeof(cbuf)); value_ptr = cbuf; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
hnangeloSat Jun 7 20:37:11 2008 UTC Modified files: /php-src/ext/exif exif.c Log: Add Unicode support http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.201r2=1.202diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.201 php-src/ext/exif/exif.c:1.202 --- php-src/ext/exif/exif.c:1.201 Wed Mar 12 17:32:26 2008 +++ php-src/ext/exif/exif.c Sat Jun 7 20:37:11 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.201 2008/03/12 17:32:26 iliaa Exp $ */ +/* $Id: exif.c,v 1.202 2008/06/07 20:37:11 hnangelo Exp $ */ /* ToDos * @@ -142,7 +142,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.201 2008/03/12 17:32:26 iliaa Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.202 2008/06/07 20:37:11 hnangelo Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -1970,7 +1970,7 @@ /* php_error_docref(NULL TSRMLS_CC, E_NOTICE, Adding infos: tag(0x%04X,%12s,L=0x%04X): %s, info_tag, exif_get_tagname(info_tag, buffer, -12, exif_get_tag_table(section_index) TSRMLS_CC), info_data-length, info_data-format==TAG_FMT_STRING?(info_valueinfo_value-s?info_value-s:no data):exif_get_tagformat(info_data-format));*/ #endif if (info_data-length==0) { - add_assoc_null(tmpi, name); + add_ascii_assoc_null(tmpi, name); } else { switch (info_data-format) { default: @@ -1983,9 +1983,9 @@ case TAG_FMT_SBYTE: case TAG_FMT_UNDEFINED: if (!info_value-s) { - add_assoc_stringl(tmpi, name, , 0, 1); + add_ascii_assoc_ascii_stringl(tmpi, name, , 0, 1); } else { - add_assoc_stringl(tmpi, name, info_value-s, info_data-length, 1); + add_ascii_assoc_ascii_stringl(tmpi, name, info_value-s, info_data-length, 1); } break; @@ -1994,9 +1994,9 @@ val = ; } if (section_index==SECTION_COMMENT) { - add_index_string(tmpi, idx++, val, 1); + add_index_ascii_string(tmpi, idx++, val, 1); } else { - add_assoc_string(tmpi, name, val, 1); + add_ascii_assoc_ascii_string(tmpi, name, val, 1); } break; @@ -2032,7 +2032,7 @@ case TAG_FMT_USHORT: case TAG_FMT_ULONG: if (l==1) { - add_assoc_long(tmpi, name, (int)info_value-u); + add_ascii_assoc_long(tmpi, name, (int)info_value-u); } else { add_index_long(array, ap, (int)info_value-u); } @@ -2041,9 +2041,9 @@ case TAG_FMT_URATIONAL: snprintf(buffer, sizeof(buffer), %i/%i, info_value-ur.num, info_value-ur.den); if (l==1) { - add_assoc_string(tmpi, name, buffer, 1); + add_ascii_assoc_ascii_string(tmpi, name, buffer, 1); } else { - add_index_string(array, ap, buffer, 1); + add_index_ascii_string(array, ap, buffer,
[PHP-CVS] cvs: php-src /ext/exif exif.c
iliaa Wed Mar 12 17:32:26 2008 UTC Modified files: /php-src/ext/exif exif.c Log: MFB: Fixed bug #44388 (Crash inside exif_read_data() on invalid images) http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.200r2=1.201diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.200 php-src/ext/exif/exif.c:1.201 --- php-src/ext/exif/exif.c:1.200 Fri Mar 7 18:41:59 2008 +++ php-src/ext/exif/exif.c Wed Mar 12 17:32:26 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.200 2008/03/07 18:41:59 pajoye Exp $ */ +/* $Id: exif.c,v 1.201 2008/03/12 17:32:26 iliaa Exp $ */ /* ToDos * @@ -142,7 +142,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.200 2008/03/07 18:41:59 pajoye Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.201 2008/03/12 17:32:26 iliaa Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -2856,7 +2856,7 @@ /* exception are IFD pointers */ exif_error_docref(exif_read_data#error_ifd EXIFERR_CC, ImageInfo, E_WARNING, Process tag(x%04X=%s): Illegal pointer offset(x%04X + x%04X = x%04X x%04X), tag, exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC), offset_val, byte_count, offset_val+byte_count, IFDlength); } - return TRUE; + return FALSE; } if (byte_countsizeof(cbuf)) { /* mark as outside range and get buffer */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
pajoye Fri Mar 7 18:41:59 2008 UTC Modified files: /php-src/ext/exif exif.c Log: - MFB: #44355 compilation breaks due illegal const usage http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.199r2=1.200diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.199 php-src/ext/exif/exif.c:1.200 --- php-src/ext/exif/exif.c:1.199 Mon Dec 31 07:12:09 2007 +++ php-src/ext/exif/exif.c Fri Mar 7 18:41:59 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.199 2007/12/31 07:12:09 sebastian Exp $ */ +/* $Id: exif.c,v 1.200 2008/03/07 18:41:59 pajoye Exp $ */ /* ToDos * @@ -142,7 +142,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.199 2007/12/31 07:12:09 sebastian Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.200 2008/03/07 18:41:59 pajoye Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -242,7 +242,7 @@ /* }}} */ /* {{{ exif dependencies */ -static const zend_module_dep exif_module_deps[] = { +static zend_module_dep exif_module_deps[] = { ZEND_MOD_REQUIRED(standard) #if EXIF_USE_MBSTRING ZEND_MOD_REQUIRED(mbstring) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
janiMon Dec 17 08:51:58 2007 UTC Modified files: /php-src/ext/exif exif.c Log: - Fix indent of macros http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.197r2=1.198diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.197 php-src/ext/exif/exif.c:1.198 --- php-src/ext/exif/exif.c:1.197 Sun Dec 16 17:15:05 2007 +++ php-src/ext/exif/exif.c Mon Dec 17 08:51:58 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.197 2007/12/16 17:15:05 iliaa Exp $ */ +/* $Id: exif.c,v 1.198 2007/12/17 08:51:58 jani Exp $ */ /* ToDos * @@ -142,7 +142,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.197 2007/12/16 17:15:05 iliaa Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.198 2007/12/17 08:51:58 jani Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -244,9 +244,9 @@ /* {{{ exif dependencies */ static const zend_module_dep exif_module_deps[] = { ZEND_MOD_REQUIRED(standard) - #if EXIF_USE_MBSTRING +#if EXIF_USE_MBSTRING ZEND_MOD_REQUIRED(mbstring) - #endif +#endif {NULL, NULL, NULL} }; /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
iliaa Sun Dec 16 17:15:05 2007 UTC Modified files: /php-src/ext/exif exif.c Log: MFB: Fixed bug #43606 (define missing depencies of the exif extension) http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.196r2=1.197diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.196 php-src/ext/exif/exif.c:1.197 --- php-src/ext/exif/exif.c:1.196 Thu Sep 27 18:28:39 2007 +++ php-src/ext/exif/exif.c Sun Dec 16 17:15:05 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.196 2007/09/27 18:28:39 dmitry Exp $ */ +/* $Id: exif.c,v 1.197 2007/12/16 17:15:05 iliaa Exp $ */ /* ToDos * @@ -142,7 +142,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.196 2007/09/27 18:28:39 dmitry Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.197 2007/12/16 17:15:05 iliaa Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -241,12 +241,21 @@ } /* }}} */ +/* {{{ exif dependencies */ +static const zend_module_dep exif_module_deps[] = { + ZEND_MOD_REQUIRED(standard) + #if EXIF_USE_MBSTRING + ZEND_MOD_REQUIRED(mbstring) + #endif + {NULL, NULL, NULL} +}; +/* }}} */ + /* {{{ exif_module_entry */ zend_module_entry exif_module_entry = { -#if ZEND_MODULE_API_NO = 20010901 - STANDARD_MODULE_HEADER, -#endif + STANDARD_MODULE_HEADER_EX, NULL, + exif_module_deps, exif, exif_functions, PHP_MINIT(exif), -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
helly Sun Feb 25 13:09:07 2007 UTC Modified files: /php-src/ext/exif exif.c Log: - Readability http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.193r2=1.194diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.193 php-src/ext/exif/exif.c:1.194 --- php-src/ext/exif/exif.c:1.193 Sat Feb 24 18:37:46 2007 +++ php-src/ext/exif/exif.c Sun Feb 25 13:09:07 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.193 2007/02/24 18:37:46 helly Exp $ */ +/* $Id: exif.c,v 1.194 2007/02/25 13:09:07 helly Exp $ */ /* ToDos * @@ -142,7 +142,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.193 2007/02/24 18:37:46 helly Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.194 2007/02/25 13:09:07 helly Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -569,7 +569,7 @@ #define TAG_TABLE_END \ {TAG_NONE, No tag value},\ {TAG_COMPUTED_VALUE, Computed value},\ - {TAG_END_OF_LIST,} /* Important for exif_get_tagname() IF value != functionresult is != false */ + {TAG_END_OF_LIST,} /* Important for exif_get_tagname() IF value != function result is != false */ static tag_info_array tag_table_IFD = { { 0x000B, ACDComment}, @@ -996,11 +996,8 @@ int i, t; char tmp[32]; - for (i=0;;i++) { - if ((t=tag_table[i].Tag) == tag_num || t==TAG_END_OF_LIST) { - if (t==TAG_END_OF_LIST) { - break; - } + for (i = 0; (t = tag_table[i].Tag) != TAG_END_OF_LIST; i++) { + if (t == tag_num) { if (ret len) { strlcpy(ret, tag_table[i].Desc, abs(len)); if (len 0) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
helly Sat Feb 24 18:37:47 2007 UTC Modified files: /php-src/ext/exif exif.c Log: - MFB Synch http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.192r2=1.193diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.192 php-src/ext/exif/exif.c:1.193 --- php-src/ext/exif/exif.c:1.192 Sat Feb 24 16:25:53 2007 +++ php-src/ext/exif/exif.c Sat Feb 24 18:37:46 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.192 2007/02/24 16:25:53 helly Exp $ */ +/* $Id: exif.c,v 1.193 2007/02/24 18:37:46 helly Exp $ */ /* ToDos * @@ -84,6 +84,9 @@ #ifndef safe_emalloc # define safe_emalloc(a,b,c) emalloc((a)*(b)+(c)) #endif +#ifndef safe_erealloc +# define safe_erealloc(p,a,b,c) erealloc(p, (a)*(b)+(c)) +#endif #ifndef TRUE # define TRUE 1 @@ -139,7 +142,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.192 2007/02/24 16:25:53 helly Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.193 2007/02/24 18:37:46 helly Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -999,27 +1002,24 @@ break; } if (ret len) { - strncpy(ret, tag_table[i].Desc, abs(len)); - if (len0) { - len = -len; - ret[len-1]='\0'; - for(i=strlen(ret);ilen;i++)ret[i]=' '; + strlcpy(ret, tag_table[i].Desc, abs(len)); + if (len 0) { + memset(ret + strlen(ret), ' ', -len - strlen(ret) - 1); + ret[-len - 1] = '\0'; } - ret[len-1]='\0'; return ret; } return tag_table[i].Desc; } } + if (ret len) { snprintf(tmp, sizeof(tmp), UndefinedTag:0x%04X, tag_num); - strncpy(ret, tmp, abs(len)); - if (len0) { - len = -len; - ret[len-1]='\0'; - for(i=strlen(ret);ilen;i++)ret[i]=' '; + strlcpy(ret, tmp, abs(len)); + if (len 0) { + memset(ret + strlen(ret), ' ', -len - strlen(ret) - 1); + ret[-len - 1] = '\0'; } - ret[len-1]='\0'; return ret; } return ; @@ -1597,7 +1597,7 @@ file_section*tmp; int count = ImageInfo-file.count; - tmp = erealloc(ImageInfo-file.list, (count+1)*sizeof(file_section)); + tmp = safe_erealloc(ImageInfo-file.list, (count+1), sizeof(file_section), 0); ImageInfo-file.list = tmp; ImageInfo-file.list[count].type = 0x; ImageInfo-file.list[count].data = NULL; @@ -1606,7 +1606,7 @@ if (!size) { data = NULL; } else if (data == NULL) { - data = emalloc(size); + data = safe_emalloc(size, 1, 0); } ImageInfo-file.list[count].type = type; ImageInfo-file.list[count].data = data; @@ -1629,7 +1629,7 @@ EXIF_ERRLOG_FSREALLOC(ImageInfo) return -1; } - tmp = erealloc(ImageInfo-file.list[section_index].data, size); + tmp = safe_erealloc(ImageInfo-file.list[section_index].data, 1, size, 0); ImageInfo-file.list[section_index].data = tmp; ImageInfo-file.list[section_index].size = size; return 0; @@ -1669,7 +1669,7 @@ return; } - list = erealloc(image_info-info_list[section_index].list, (image_info-info_list[section_index].count+1)*sizeof(image_info_data)); + list = safe_erealloc(image_info-info_list[section_index].list, (image_info-info_list[section_index].count+1), sizeof(image_info_data), 0); image_info-info_list[section_index].list = list; info_data = image_info-info_list[section_index].list[image_info-info_list[section_index].count]; @@ -1798,7 +1798,7 @@ image_info_data *info_data; image_info_data *list; - list = erealloc(image_info-info_list[section_index].list, (image_info-info_list[section_index].count+1)*sizeof(image_info_data)); + list = safe_erealloc(image_info-info_list[section_index].list, (image_info-info_list[section_index].count+1), sizeof(image_info_data), 0); image_info-info_list[section_index].list = list; info_data = image_info-info_list[section_index].list[image_info-info_list[section_index].count]; @@ -1821,7 +1821,7 @@ image_info_data *list; if (value) { - list =
[PHP-CVS] cvs: php-src /ext/exif exif.c
tony2001Tue Jan 9 11:37:05 2007 UTC Modified files: /php-src/ext/exif exif.c Log: zerofill info_data and fix possible segfault partly fixes #40073 http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.189r2=1.190diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.189 php-src/ext/exif/exif.c:1.190 --- php-src/ext/exif/exif.c:1.189 Wed Jan 3 20:49:27 2007 +++ php-src/ext/exif/exif.c Tue Jan 9 11:37:05 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.189 2007/01/03 20:49:27 tony2001 Exp $ */ +/* $Id: exif.c,v 1.190 2007/01/09 11:37:05 tony2001 Exp $ */ /* ToDos * @@ -139,7 +139,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.189 2007/01/03 20:49:27 tony2001 Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.190 2007/01/09 11:37:05 tony2001 Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -1599,6 +1599,7 @@ image_info-info_list[section_index].list = list; info_data = image_info-info_list[section_index].list[image_info-info_list[section_index].count]; + memset(info_data, 0, sizeof(image_info_data)); info_data-tag= tag; info_data-format = format; info_data-length = length; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
helly Tue Jan 9 17:52:02 2007 UTC Modified files: /php-src/ext/exif exif.c Log: - Improve debugging and fix #40073 http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.190r2=1.191diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.190 php-src/ext/exif/exif.c:1.191 --- php-src/ext/exif/exif.c:1.190 Tue Jan 9 11:37:05 2007 +++ php-src/ext/exif/exif.c Tue Jan 9 17:52:02 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.190 2007/01/09 11:37:05 tony2001 Exp $ */ +/* $Id: exif.c,v 1.191 2007/01/09 17:52:02 helly Exp $ */ /* ToDos * @@ -139,7 +139,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.190 2007/01/09 11:37:05 tony2001 Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.191 2007/01/09 17:52:02 helly Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -1150,6 +1150,80 @@ } /* }}} */ +#ifdef EXIF_DEBUG +char * exif_dump_data(int *dump_free, int format, int components, int length, int motorola_intel, char *value_ptr TSRMLS_DC) /* {{{ */ +{ + char *dump; + int len; + + *dump_free = 0; + if (format == TAG_FMT_STRING) { + return value_ptr ? value_ptr : no data; + } + if (format == TAG_FMT_UNDEFINED) { + return undefined\n; + } + if (format == TAG_FMT_IFD) { + return ; + } + if (format == TAG_FMT_SINGLE || format == TAG_FMT_DOUBLE) { + return not implemented; + } + *dump_free = 1; + if (components 1) { + len = spprintf(dump, 0, (%d,%d) {, components, length); + } else { + len = spprintf(dump, 0, {); + } + while(components 0) { + switch(format) { + case TAG_FMT_BYTE: + case TAG_FMT_UNDEFINED: + case TAG_FMT_STRING: + case TAG_FMT_SBYTE: + dump = erealloc(dump, len + 4); + sprintf(dump + len, 0x%02X, *value_ptr); + len += 4; + value_ptr++; + break; + case TAG_FMT_USHORT: + case TAG_FMT_SSHORT: + dump = erealloc(dump, len + 6); + sprintf(dump + len, 0x%04X, php_ifd_get16s(value_ptr, motorola_intel)); + len += 6; + value_ptr += 2; + break; + case TAG_FMT_ULONG: + case TAG_FMT_SLONG: + dump = erealloc(dump, len + 6); + sprintf(dump + len, 0x%04X, php_ifd_get32s(value_ptr, motorola_intel)); + len += 6; + value_ptr += 4; + break; + case TAG_FMT_URATIONAL: + case TAG_FMT_SRATIONAL: + dump = erealloc(dump, len + 13); + sprintf(dump + len, 0x%04X/0x%04X, php_ifd_get32s(value_ptr, motorola_intel), php_ifd_get32s(value_ptr+4, motorola_intel)); + len += 13; + value_ptr += 8; + break; + } + if (components 0) { + dump = erealloc(dump, len + 2); + sprintf(dump + len, , ); + len += 2; + components--; + } else{ + break; + } + } + dump = erealloc(dump, len + 2); + sprintf(dump + len, }); + return dump; +} +/* }}} */ +#endif + /* {{{ exif_convert_any_format * Evaluate number, be it int, rational, or float from directory. */ static double exif_convert_any_format(void *value, int format, int motorola_intel TSRMLS_DC) @@ -2726,10 +2800,14 @@ char *value_ptr, tagname[64], cbuf[32], *outside=NULL; size_t byte_count, offset_val, fpos, fgot; xp_field_type *tmp_xp; +#ifdef EXIF_DEBUG + char *dump_data; + int dump_free; +#endif /* EXIF_DEBUG */ /* Protect against corrupt headers */ if (ImageInfo-ifd_nesting_level MAX_IFD_NESTING_LEVEL) { - exif_error_docref(exif_read_data#error_ifd TSRMLS_CC, ImageInfo, E_WARNING, corrupt EXIF header: maximum directory nesting level reached); + exif_error_docref(exif_read_data#error_ifd EXIFERR_CC, ImageInfo, E_WARNING, corrupt EXIF header: maximum directory nesting level reached); return FALSE; } ImageInfo-ifd_nesting_level++; @@ -2814,7 +2892,11 @@ ImageInfo-sections_found |=
[PHP-CVS] cvs: php-src /ext/exif exif.c /ext/mime_magic mime_magic.c /ext/sqlite sqlite.c ZendEngine2 zend_extensions.h zend_modules.h
tony2001Wed Jan 3 20:49:27 2007 UTC Modified files: /ZendEngine2zend_extensions.h zend_modules.h /php-src/ext/exif exif.c /php-src/ext/mime_magic mime_magic.c /php-src/ext/sqlite sqlite.c Log: more magic number fixes http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_extensions.h?r1=1.74r2=1.75diff_format=u Index: ZendEngine2/zend_extensions.h diff -u ZendEngine2/zend_extensions.h:1.74 ZendEngine2/zend_extensions.h:1.75 --- ZendEngine2/zend_extensions.h:1.74 Mon Jan 1 09:29:21 2007 +++ ZendEngine2/zend_extensions.h Wed Jan 3 20:49:27 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: zend_extensions.h,v 1.74 2007/01/01 09:29:21 sebastian Exp $ */ +/* $Id: zend_extensions.h,v 1.75 2007/01/03 20:49:27 tony2001 Exp $ */ #ifndef ZEND_EXTENSIONS_H #define ZEND_EXTENSIONS_H @@ -27,7 +27,7 @@ /* The first number is the engine version and the rest is the date. * This way engine 2/3 API no. is always greater than engine 1 API no.. */ -#define ZEND_EXTENSION_API_NO 320070519 +#define ZEND_EXTENSION_API_NO 320060519 typedef struct _zend_extension_version_info { int zend_extension_api_no; http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_modules.h?r1=1.75r2=1.76diff_format=u Index: ZendEngine2/zend_modules.h diff -u ZendEngine2/zend_modules.h:1.75 ZendEngine2/zend_modules.h:1.76 --- ZendEngine2/zend_modules.h:1.75 Mon Jan 1 09:29:21 2007 +++ ZendEngine2/zend_modules.h Wed Jan 3 20:49:27 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: zend_modules.h,v 1.75 2007/01/01 09:29:21 sebastian Exp $ */ +/* $Id: zend_modules.h,v 1.76 2007/01/03 20:49:27 tony2001 Exp $ */ #ifndef MODULES_H #define MODULES_H @@ -39,7 +39,7 @@ extern struct _zend_arg_info fifth_arg_force_ref[6]; extern struct _zend_arg_info all_args_by_ref[1]; -#define ZEND_MODULE_API_NO 20070613 +#define ZEND_MODULE_API_NO 20060613 #ifdef ZTS #define USING_ZTS 1 #else http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.188r2=1.189diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.188 php-src/ext/exif/exif.c:1.189 --- php-src/ext/exif/exif.c:1.188 Mon Jan 1 09:29:23 2007 +++ php-src/ext/exif/exif.c Wed Jan 3 20:49:27 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.188 2007/01/01 09:29:23 sebastian Exp $ */ +/* $Id: exif.c,v 1.189 2007/01/03 20:49:27 tony2001 Exp $ */ /* ToDos * @@ -139,7 +139,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.188 2007/01/01 09:29:23 sebastian Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.189 2007/01/03 20:49:27 tony2001 Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -253,7 +253,7 @@ #if ZEND_MODULE_API_NO = 20010901 EXIF_VERSION, #endif -#if ZEND_MODULE_API_NO = 20070613 +#if ZEND_MODULE_API_NO = 20060613 PHP_MODULE_GLOBALS(exif), PHP_GINIT(exif), NULL, http://cvs.php.net/viewvc.cgi/php-src/ext/mime_magic/mime_magic.c?r1=1.54r2=1.55diff_format=u Index: php-src/ext/mime_magic/mime_magic.c diff -u php-src/ext/mime_magic/mime_magic.c:1.54 php-src/ext/mime_magic/mime_magic.c:1.55 --- php-src/ext/mime_magic/mime_magic.c:1.54Mon Jan 1 09:29:25 2007 +++ php-src/ext/mime_magic/mime_magic.c Wed Jan 3 20:49:27 2007 @@ -15,7 +15,7 @@ | Author: Hartmut Holzgraefe [EMAIL PROTECTED] | +--+ - $Id: mime_magic.c,v 1.54 2007/01/01 09:29:25 sebastian Exp $ + $Id: mime_magic.c,v 1.55 2007/01/03 20:49:27 tony2001 Exp $ This module contains a lot of stuff taken from Apache mod_mime_magic, so the license section is a little bit longer than usual: @@ -240,7 +240,7 @@ #if ZEND_MODULE_API_NO = 20010901 0.1, #endif -#if ZEND_MODULE_API_NO = 20070613 +#if ZEND_MODULE_API_NO = 20060613 PHP_MODULE_GLOBALS(mime_magic), PHP_GINIT(mime_magic), NULL, http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite/sqlite.c?r1=1.200r2=1.201diff_format=u Index: php-src/ext/sqlite/sqlite.c diff -u php-src/ext/sqlite/sqlite.c:1.200 php-src/ext/sqlite/sqlite.c:1.201 --- php-src/ext/sqlite/sqlite.c:1.200 Mon Jan 1 09:29:30 2007 +++ php-src/ext/sqlite/sqlite.c Wed Jan 3 20:49:27 2007 @@ -17,7 +17,7 @@ | Marcus Boerger [EMAIL PROTECTED] | +--+ - $Id: sqlite.c,v 1.200 2007/01/01 09:29:30 sebastian Exp $ + $Id: sqlite.c,v 1.201 2007/01/03 20:49:27 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H @@ -347,7 +347,7 @@ #if ZEND_MODULE_API_NO = 20010901 PHP_SQLITE_MODULE_VERSION, #endif -#if ZEND_MODULE_API_NO = 20070613 +#if ZEND_MODULE_API_NO = 20060613 PHP_MODULE_GLOBALS(sqlite),
[PHP-CVS] cvs: php-src /ext/exif exif.c /ext/interbase ibase_query.c /ext/json json.c /ext/pdo_dblib dblib_driver.c dblib_stmt.c /ext/pgsql pgsql.c /ext/soap php_encoding.c /ext/spl spl_director
iliaa Tue Dec 26 17:40:20 2006 UTC Modified files: /ZendEngine2zend_ini.c zend_ini.h /php-src/ext/exif exif.c /php-src/ext/interbase ibase_query.c /php-src/ext/json json.c /php-src/ext/pdo_dblib dblib_driver.c dblib_stmt.c /php-src/ext/pgsql pgsql.c /php-src/ext/soap php_encoding.c /php-src/ext/splspl_directory.c /php-src/ext/standard uuencode.c var.c /php-src/main main.c Log: MFB: safety checks http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini.c?r1=1.50r2=1.51diff_format=u Index: ZendEngine2/zend_ini.c diff -u ZendEngine2/zend_ini.c:1.50 ZendEngine2/zend_ini.c:1.51 --- ZendEngine2/zend_ini.c:1.50 Fri Dec 22 21:38:12 2006 +++ ZendEngine2/zend_ini.c Tue Dec 26 17:40:20 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: zend_ini.c,v 1.50 2006/12/22 21:38:12 andrei Exp $ */ +/* $Id: zend_ini.c,v 1.51 2006/12/26 17:40:20 iliaa Exp $ */ #include zend.h #include zend_qsort.h @@ -530,6 +530,28 @@ *p = zend_atoi(new_value, new_value_length); return SUCCESS; } +ZEND_API ZEND_INI_MH(OnUpdateLongGEZero) +{ + long *p, tmp; +#ifndef ZTS + char *base = (char *) mh_arg2; +#else + char *base; + + base = (char *) ts_resource(*((int *) mh_arg2)); +#endif + + tmp = zend_atoi(new_value, new_value_length); + if (tmp 0) { + return FAILURE; + } + + p = (long *) (base+(size_t) mh_arg1); + *p = tmp; + + return SUCCESS; +} + ZEND_API ZEND_INI_MH(OnUpdateReal) http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini.h?r1=1.38r2=1.39diff_format=u Index: ZendEngine2/zend_ini.h diff -u ZendEngine2/zend_ini.h:1.38 ZendEngine2/zend_ini.h:1.39 --- ZendEngine2/zend_ini.h:1.38 Fri Dec 22 21:38:12 2006 +++ ZendEngine2/zend_ini.h Tue Dec 26 17:40:20 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: zend_ini.h,v 1.38 2006/12/22 21:38:12 andrei Exp $ */ +/* $Id: zend_ini.h,v 1.39 2006/12/26 17:40:20 iliaa Exp $ */ #ifndef ZEND_INI_H #define ZEND_INI_H @@ -175,6 +175,7 @@ BEGIN_EXTERN_C() ZEND_API ZEND_INI_MH(OnUpdateBool); ZEND_API ZEND_INI_MH(OnUpdateLong); +ZEND_API ZEND_INI_MH(OnUpdateLongGEZero); ZEND_API ZEND_INI_MH(OnUpdateReal); ZEND_API ZEND_INI_MH(OnUpdateString); ZEND_API ZEND_INI_MH(OnUpdateStringUnempty); http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.186r2=1.187diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.186 php-src/ext/exif/exif.c:1.187 --- php-src/ext/exif/exif.c:1.186 Mon Dec 25 16:49:04 2006 +++ php-src/ext/exif/exif.c Tue Dec 26 17:40:20 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.186 2006/12/25 16:49:04 iliaa Exp $ */ +/* $Id: exif.c,v 1.187 2006/12/26 17:40:20 iliaa Exp $ */ /* ToDos * @@ -139,7 +139,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.186 2006/12/25 16:49:04 iliaa Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.187 2006/12/26 17:40:20 iliaa Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -3569,7 +3569,7 @@ exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, %s THUMBNAIL @0x%04X + 0x%04X, ImageInfo-Thumbnail.data ? Ignore : Read, ImageInfo-Thumbnail.offset, ImageInfo-Thumbnail.size); #endif if (!ImageInfo-Thumbnail.data) { - ImageInfo-Thumbnail.data = emalloc(ImageInfo-Thumbnail.size); + ImageInfo-Thumbnail.data = safe_emalloc(ImageInfo-Thumbnail.size, 1, 0); php_stream_seek(ImageInfo-infile, ImageInfo-Thumbnail.offset, SEEK_SET); fgot = php_stream_read(ImageInfo-infile, ImageInfo-Thumbnail.data, ImageInfo-Thumbnail.size); if (fgot ImageInfo-Thumbnail.size) { @@ -3602,7 +3602,7 @@ exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, %s THUMBNAIL @0x%04X + 0x%04X, ImageInfo-Thumbnail.data ? Ignore : Read, ImageInfo-Thumbnail.offset, ImageInfo-Thumbnail.size); #endif if (!ImageInfo-Thumbnail.data ImageInfo-Thumbnail.offset ImageInfo-Thumbnail.size ImageInfo-read_thumbnail) { - ImageInfo-Thumbnail.data = emalloc(ImageInfo-Thumbnail.size); + ImageInfo-Thumbnail.data = safe_emalloc(ImageInfo-Thumbnail.size, 1, 0);
[PHP-CVS] cvs: php-src /ext/exif exif.c /ext/informix ifx.ec /ext/standard http_fopen_wrapper.c microtime.c
iliaa Mon Dec 25 16:49:04 2006 UTC Modified files: /php-src/ext/standard microtime.c http_fopen_wrapper.c /php-src/ext/informix ifx.ec /php-src/ext/exif exif.c Log: MFB: Use %F (ignores locale) for internal representation of floats http://cvs.php.net/viewvc.cgi/php-src/ext/standard/microtime.c?r1=1.58r2=1.59diff_format=u Index: php-src/ext/standard/microtime.c diff -u php-src/ext/standard/microtime.c:1.58 php-src/ext/standard/microtime.c:1.59 --- php-src/ext/standard/microtime.c:1.58 Thu Oct 19 22:14:04 2006 +++ php-src/ext/standard/microtime.cMon Dec 25 16:49:04 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: microtime.c,v 1.58 2006/10/19 22:14:04 andrei Exp $ */ +/* $Id: microtime.c,v 1.59 2006/12/25 16:49:04 iliaa Exp $ */ #include php.h @@ -84,7 +84,7 @@ } else { char ret[100]; - snprintf(ret, 100, %.8f %ld, tp.tv_usec / MICRO_IN_SEC, tp.tv_sec); + snprintf(ret, 100, %.8F %ld, tp.tv_usec / MICRO_IN_SEC, tp.tv_sec); RETURN_ASCII_STRING(ret, ZSTR_DUPLICATE); } } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/http_fopen_wrapper.c?r1=1.121r2=1.122diff_format=u Index: php-src/ext/standard/http_fopen_wrapper.c diff -u php-src/ext/standard/http_fopen_wrapper.c:1.121 php-src/ext/standard/http_fopen_wrapper.c:1.122 --- php-src/ext/standard/http_fopen_wrapper.c:1.121 Tue Dec 5 18:42:22 2006 +++ php-src/ext/standard/http_fopen_wrapper.c Mon Dec 25 16:49:04 2006 @@ -19,7 +19,7 @@ | Sara Golemon [EMAIL PROTECTED] | +--+ */ -/* $Id: http_fopen_wrapper.c,v 1.121 2006/12/05 18:42:22 tony2001 Exp $ */ +/* $Id: http_fopen_wrapper.c,v 1.122 2006/12/25 16:49:04 iliaa Exp $ */ #include php.h #include php_globals.h @@ -288,7 +288,7 @@ php_stream_context_get_option(context, http, protocol_version, tmpzval) == SUCCESS) { SEPARATE_ZVAL(tmpzval); convert_to_double_ex(tmpzval); - protocol_version_len = spprintf(protocol_version, 0, %.1f, Z_DVAL_PP(tmpzval)); + protocol_version_len = spprintf(protocol_version, 0, %.1F, Z_DVAL_PP(tmpzval)); } if (!scratch) { http://cvs.php.net/viewvc.cgi/php-src/ext/informix/ifx.ec?r1=1.116r2=1.117diff_format=u Index: php-src/ext/informix/ifx.ec diff -u php-src/ext/informix/ifx.ec:1.116 php-src/ext/informix/ifx.ec:1.117 --- php-src/ext/informix/ifx.ec:1.116 Thu May 4 22:47:53 2006 +++ php-src/ext/informix/ifx.ec Mon Dec 25 16:49:04 2006 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: ifx.ec,v 1.116 2006/05/04 22:47:53 tony2001 Exp $ */ +/* $Id: ifx.ec,v 1.117 2006/12/25 16:49:04 iliaa Exp $ */ /* --- * if you want a function reference : grep '^\*\*' ifx.ec will give @@ -449,7 +449,7 @@ php_info_print_table_row(2, Active Persistent links, buf); sprintf(buf, %ld, IFXG(num_links)); php_info_print_table_row(2, Active links, buf); - sprintf(buf, %02.2f, (double)(IFX_VERSION/100.0)); + sprintf(buf, %02.2F, (double)(IFX_VERSION/100.0)); php_info_print_table_row(2, ESQL/C Version, buf); php_info_print_table_end(); http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.185r2=1.186diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.185 php-src/ext/exif/exif.c:1.186 --- php-src/ext/exif/exif.c:1.185 Sat Nov 4 20:46:21 2006 +++ php-src/ext/exif/exif.c Mon Dec 25 16:49:04 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.185 2006/11/04 20:46:21 helly Exp $ */ +/* $Id: exif.c,v 1.186 2006/12/25 16:49:04 iliaa Exp $ */ /* ToDos * @@ -139,7 +139,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.185 2006/11/04 20:46:21 helly Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.186 2006/12/25 16:49:04 iliaa Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -3893,7 +3893,7 @@ exif_iif_add_int(ImageInfo, SECTION_COMPUTED, ByteOrderMotorola, ImageInfo.motorola_intel TSRMLS_CC); } if (ImageInfo.FocalLength) { - exif_iif_add_fmt(ImageInfo, SECTION_COMPUTED, FocalLength TSRMLS_CC, %4.1fmm, ImageInfo.FocalLength); + exif_iif_add_fmt(ImageInfo, SECTION_COMPUTED, FocalLength TSRMLS_CC, %4.1Fmm, ImageInfo.FocalLength); if(ImageInfo.CCDWidth) { exif_iif_add_fmt(ImageInfo, SECTION_COMPUTED, 35mmFocalLength TSRMLS_CC, %dmm, (int)(ImageInfo.FocalLength/ImageInfo.CCDWidth*35+0.5)); } @@ -3903,19 +3903,19 @@ }
[PHP-CVS] cvs: php-src /ext/exif exif.c
helly Sat Nov 4 20:46:22 2006 UTC Modified files: /php-src/ext/exif exif.c Log: - Make parameter parsing api check happy http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.184r2=1.185diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.184 php-src/ext/exif/exif.c:1.185 --- php-src/ext/exif/exif.c:1.184 Tue Oct 10 22:21:36 2006 +++ php-src/ext/exif/exif.c Sat Nov 4 20:46:21 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.184 2006/10/10 22:21:36 tony2001 Exp $ */ +/* $Id: exif.c,v 1.185 2006/11/04 20:46:21 helly Exp $ */ /* ToDos * @@ -139,7 +139,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.184 2006/10/10 22:21:36 tony2001 Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.185 2006/11/04 20:46:21 helly Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -3984,7 +3984,7 @@ Reads the embedded thumbnail */ PHP_FUNCTION(exif_thumbnail) { - zval *p_width, *p_height, *p_imagetype; + zval *p_width = 0, *p_height = 0, *p_imagetype = 0; char *p_name; int p_name_len, ret, arg_c = ZEND_NUM_ARGS(); image_info_type ImageInfo; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
tony2001Tue Oct 10 22:21:37 2006 UTC Modified files: /php-src/ext/exif exif.c Log: fix leak and typos in error messages http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.183r2=1.184diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.183 php-src/ext/exif/exif.c:1.184 --- php-src/ext/exif/exif.c:1.183 Thu Aug 17 14:32:27 2006 +++ php-src/ext/exif/exif.c Tue Oct 10 22:21:36 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.183 2006/08/17 14:32:27 tony2001 Exp $ */ +/* $Id: exif.c,v 1.184 2006/10/10 22:21:36 tony2001 Exp $ */ /* ToDos * @@ -139,7 +139,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.183 2006/08/17 14:32:27 tony2001 Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.184 2006/10/10 22:21:36 tony2001 Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -2161,7 +2161,7 @@ } } else { exif_iif_add_tag(image_info, SECTION_COMMENT, Comment, TAG_COMPUTED_VALUE, TAG_FMT_UNDEFINED, 0, NULL); - php_error_docref(NULL TSRMLS_CC, E_NOTICE, JPEG2000 comment section to small); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, JPEG2000 comment section too small); } } #endif @@ -3687,7 +3687,7 @@ } } } else { - exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, File to small (%d), ImageInfo-FileSize); + exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, File too small (%d), ImageInfo-FileSize); } return ret; } @@ -4001,6 +4001,7 @@ ret = exif_read_file(ImageInfo, p_name, 1, 0 TSRMLS_CC); if (ret==FALSE) { + exif_discard_imageinfo(ImageInfo); RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
tony2001Thu Aug 17 14:32:28 2006 UTC Modified files: /php-src/ext/exif exif.c Log: initialize static buffer with 0's http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.182r2=1.183diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.182 php-src/ext/exif/exif.c:1.183 --- php-src/ext/exif/exif.c:1.182 Tue Jun 13 13:12:18 2006 +++ php-src/ext/exif/exif.c Thu Aug 17 14:32:27 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.182 2006/06/13 13:12:18 dmitry Exp $ */ +/* $Id: exif.c,v 1.183 2006/08/17 14:32:27 tony2001 Exp $ */ /* ToDos * @@ -139,7 +139,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.182 2006/06/13 13:12:18 dmitry Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.183 2006/08/17 14:32:27 tony2001 Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -2785,6 +2785,7 @@ // pointers read without the need to free them // explicitley before returning. */ + memset(cbuf, 0, sizeof(cbuf)); value_ptr = cbuf; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
helly Mon Apr 10 18:23:15 2006 UTC Modified files: /php-src/ext/exif exif.c Log: - Fix condition http://cvs.php.net/viewcvs.cgi/php-src/ext/exif/exif.c?r1=1.179r2=1.180diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.179 php-src/ext/exif/exif.c:1.180 --- php-src/ext/exif/exif.c:1.179 Wed Mar 8 00:43:27 2006 +++ php-src/ext/exif/exif.c Mon Apr 10 18:23:15 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.179 2006/03/08 00:43:27 pajoye Exp $ */ +/* $Id: exif.c,v 1.180 2006/04/10 18:23:15 helly Exp $ */ /* ToDos * @@ -115,7 +115,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.179 2006/03/08 00:43:27 pajoye Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.180 2006/04/10 18:23:15 helly Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -1560,7 +1560,7 @@ image_info_data *info_data; image_info_data *list; - if (length = LONG_MAX) { + if (length 0) { return; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
helly Mon Oct 10 02:06:14 2005 EDT Modified files: /php-src/ext/exif exif.c Log: - Fix logic http://cvs.php.net/diff.php/php-src/ext/exif/exif.c?r1=1.174r2=1.175ty=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.174 php-src/ext/exif/exif.c:1.175 --- php-src/ext/exif/exif.c:1.174 Sun Oct 9 10:11:41 2005 +++ php-src/ext/exif/exif.c Mon Oct 10 02:06:12 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.174 2005/10/09 14:11:41 helly Exp $ */ +/* $Id: exif.c,v 1.175 2005/10/10 06:06:12 helly Exp $ */ /* ToDos * @@ -115,7 +115,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.174 2005/10/09 14:11:41 helly Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.175 2005/10/10 06:06:12 helly Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -3035,7 +3035,7 @@ * Ignore IFD2 if it purportedly exists */ if (section_index == SECTION_THUMBNAIL) { - return FALSE; + return TRUE; } /* * Hack to make it process IDF1 I hope -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c /ext/exif/tests bug34704.jpg bug34704.phpt
helly Sun Oct 9 10:11:44 2005 EDT Added files: /php-src/ext/exif/tests bug34704.jpg bug34704.phpt Modified files: /php-src/ext/exif exif.c Log: Bugfix #34704 (Infinite recursion due to corrupt JPEG) (Tim Starling) http://cvs.php.net/diff.php/php-src/ext/exif/exif.c?r1=1.173r2=1.174ty=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.173 php-src/ext/exif/exif.c:1.174 --- php-src/ext/exif/exif.c:1.173 Fri Aug 5 10:03:57 2005 +++ php-src/ext/exif/exif.c Sun Oct 9 10:11:41 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.173 2005/08/05 14:03:57 hyanantha Exp $ */ +/* $Id: exif.c,v 1.174 2005/10/09 14:11:41 helly Exp $ */ /* ToDos * @@ -115,7 +115,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.173 2005/08/05 14:03:57 hyanantha Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.174 2005/10/09 14:11:41 helly Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -3032,6 +3032,12 @@ } } /* +* Ignore IFD2 if it purportedly exists +*/ + if (section_index == SECTION_THUMBNAIL) { + return FALSE; + } + /* * Hack to make it process IDF1 I hope * There are 2 IDFs, the second one holds the keys (0x0201 and 0x0202) to the thumbnail */ http://cvs.php.net/co.php/php-src/ext/exif/tests/bug34704.phpt?r=1.1p=1 Index: php-src/ext/exif/tests/bug34704.phpt +++ php-src/ext/exif/tests/bug34704.phpt --TEST-- Bug # 34704 (Infinite recursion due to corrupt JPEG) --SKIPIF-- ?php if (!extension_loaded('exif')) print 'skip exif extension not available';? --INI-- magic_quotes_runtime=0 output_handler= zlib.output_compression=0 --FILE-- ?php $infile = dirname(__FILE__).'/bug34704.jpg'; var_dump(exif_read_data($infile)); ? ===DONE=== --EXPECT-- array(7) { [FileName]= string(12) bug34704.jpg [FileDateTime]= int(1128866682) [FileSize]= int(9976) [FileType]= int(2) [MimeType]= string(10) image/jpeg [SectionsFound]= string(4) IFD0 [COMPUTED]= array(5) { [html]= string(24) width=386 height=488 [Height]= int(488) [Width]= int(386) [IsColor]= int(1) [ByteOrderMotorola]= int(0) } } ===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
hyanantha Fri Aug 5 10:03:58 2005 EDT Modified files: /php-src/ext/exif exif.c Log: NetWare specific stat structure issues. --Kamesh http://cvs.php.net/diff.php/php-src/ext/exif/exif.c?r1=1.172r2=1.173ty=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.172 php-src/ext/exif/exif.c:1.173 --- php-src/ext/exif/exif.c:1.172 Wed Aug 3 10:07:07 2005 +++ php-src/ext/exif/exif.c Fri Aug 5 10:03:57 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.172 2005/08/03 14:07:07 sniper Exp $ */ +/* $Id: exif.c,v 1.173 2005/08/05 14:03:57 hyanantha Exp $ */ /* ToDos * @@ -115,7 +115,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.172 2005/08/03 14:07:07 sniper Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.173 2005/08/05 14:03:57 hyanantha Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -3744,7 +3744,11 @@ if (php_stream_is(ImageInfo-infile, PHP_STREAM_IS_STDIO)) { if (VCWD_STAT(FileName, st) = 0) { /* Store file date/time. */ +#ifdef NETWARE + ImageInfo-FileDateTime = st.st_mtime.tv_sec; +#else ImageInfo-FileDateTime = st.st_mtime; +#endif ImageInfo-FileSize = st.st_size; /*exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, Opened stream is file: %d, ImageInfo-FileSize);*/ } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
iliaa Thu Mar 17 12:20:52 2005 EDT Modified files: /php-src/ext/exif exif.c Log: MFB: Fixed build of exif extension on win32. http://cvs.php.net/diff.php/php-src/ext/exif/exif.c?r1=1.170r2=1.171ty=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.170 php-src/ext/exif/exif.c:1.171 --- php-src/ext/exif/exif.c:1.170 Wed Mar 2 13:21:45 2005 +++ php-src/ext/exif/exif.c Thu Mar 17 12:20:52 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.170 2005/03/02 18:21:45 sesser Exp $ */ +/* $Id: exif.c,v 1.171 2005/03/17 17:20:52 iliaa Exp $ */ /* ToDos * @@ -76,6 +76,9 @@ #include ext/mbstring/mbstring.h #endif +/* needed for ssize_t definition */ +#include sys/types.h + typedef unsigned char uchar; #ifndef safe_emalloc @@ -112,7 +115,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.170 2005/03/02 18:21:45 sesser Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.171 2005/03/17 17:20:52 iliaa Exp $ /* {{{ PHP_MINFO_FUNCTION */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
sesser Wed Mar 2 13:21:46 2005 EDT Modified files: /php-src/ext/exif exif.c Log: Fixed possible bufferoverflow http://cvs.php.net/diff.php/php-src/ext/exif/exif.c?r1=1.169r2=1.170ty=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.169 php-src/ext/exif/exif.c:1.170 --- php-src/ext/exif/exif.c:1.169 Wed Feb 16 18:47:38 2005 +++ php-src/ext/exif/exif.c Wed Mar 2 13:21:45 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.169 2005/02/16 23:47:38 sniper Exp $ */ +/* $Id: exif.c,v 1.170 2005/03/02 18:21:45 sesser Exp $ */ /* ToDos * @@ -112,7 +112,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.169 2005/02/16 23:47:38 sniper Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.170 2005/03/02 18:21:45 sesser Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -2733,6 +2733,11 @@ byte_count = components * php_tiff_bytes_per_format[format]; + if ((ssize_t)byte_count 0) { + exif_error_docref(exif_read_data#error_ifd EXIFERR_CC, ImageInfo, E_WARNING, Process tag(x%04X=%s): Illegal byte_count(%ld), tag, exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC), byte_count); + return FALSE; + } + if (byte_count 4) { offset_val = php_ifd_get32u(dir_entry+8, ImageInfo-motorola_intel); /* If its bigger than 4 bytes, the dir entry contains an offset. */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
edink Wed Feb 16 04:53:33 2005 EDT Modified files: /php-src/ext/exif exif.c Log: Enable mbstring use on windows. We were linking against mbstring for some time now, but have never actually used it on Windows. Fixes #31980. http://cvs.php.net/diff.php/php-src/ext/exif/exif.c?r1=1.167r2=1.168ty=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.167 php-src/ext/exif/exif.c:1.168 --- php-src/ext/exif/exif.c:1.167 Tue Feb 15 16:56:17 2005 +++ php-src/ext/exif/exif.c Wed Feb 16 04:53:26 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.167 2005/02/15 21:56:17 iliaa Exp $ */ +/* $Id: exif.c,v 1.168 2005/02/16 09:53:26 edink Exp $ */ /* ToDos * @@ -66,7 +66,7 @@ #include ext/standard/php_image.h #include ext/standard/info.h -#if HAVE_MBSTRING !defined(COMPILE_DL_MBSTRING) +#if PHP_WIN32 ||(HAVE_MBSTRING !defined(COMPILE_DL_MBSTRING)) #define EXIF_USE_MBSTRING 1 #else #define EXIF_USE_MBSTRING 0 @@ -112,7 +112,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.167 2005/02/15 21:56:17 iliaa Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.168 2005/02/16 09:53:26 edink Exp $ /* {{{ PHP_MINFO_FUNCTION */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
sniper Wed Feb 16 18:47:39 2005 EDT Modified files: /php-src/ext/exif exif.c Log: PHP_WIN32 is defined or not defined. http://cvs.php.net/diff.php/php-src/ext/exif/exif.c?r1=1.168r2=1.169ty=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.168 php-src/ext/exif/exif.c:1.169 --- php-src/ext/exif/exif.c:1.168 Wed Feb 16 04:53:26 2005 +++ php-src/ext/exif/exif.c Wed Feb 16 18:47:38 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.168 2005/02/16 09:53:26 edink Exp $ */ +/* $Id: exif.c,v 1.169 2005/02/16 23:47:38 sniper Exp $ */ /* ToDos * @@ -66,7 +66,7 @@ #include ext/standard/php_image.h #include ext/standard/info.h -#if PHP_WIN32 ||(HAVE_MBSTRING !defined(COMPILE_DL_MBSTRING)) +#if defined(PHP_WIN32) || (HAVE_MBSTRING !defined(COMPILE_DL_MBSTRING)) #define EXIF_USE_MBSTRING 1 #else #define EXIF_USE_MBSTRING 0 @@ -112,7 +112,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.168 2005/02/16 09:53:26 edink Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.169 2005/02/16 23:47:38 sniper Exp $ /* {{{ PHP_MINFO_FUNCTION */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
iliaa Tue Feb 15 16:56:19 2005 EDT Modified files: /php-src/ext/exif exif.c Log: Fixed bug #31986 (Max nesting limit set too low). http://cvs.php.net/diff.php/php-src/ext/exif/exif.c?r1=1.166r2=1.167ty=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.166 php-src/ext/exif/exif.c:1.167 --- php-src/ext/exif/exif.c:1.166 Tue Feb 1 18:27:33 2005 +++ php-src/ext/exif/exif.c Tue Feb 15 16:56:17 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.166 2005/02/01 23:27:33 iliaa Exp $ */ +/* $Id: exif.c,v 1.167 2005/02/15 21:56:17 iliaa Exp $ */ /* ToDos * @@ -93,7 +93,7 @@ #define EFREE_IF(ptr) if (ptr) efree(ptr) -#define MAX_IFD_NESTING_LEVEL 25 +#define MAX_IFD_NESTING_LEVEL 100 static ZEND_BEGIN_ARG_INFO(exif_thumbnail_force_ref, 1) @@ -112,7 +112,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.166 2005/02/01 23:27:33 iliaa Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.167 2005/02/15 21:56:17 iliaa Exp $ /* {{{ PHP_MINFO_FUNCTION */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
iliaa Tue Feb 1 18:27:34 2005 EDT Modified files: /php-src/ext/exif exif.c Log: Fixed bug #31797 (exif_read_data() uses too low nesting limit). http://cvs.php.net/diff.php/php-src/ext/exif/exif.c?r1=1.165r2=1.166ty=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.165 php-src/ext/exif/exif.c:1.166 --- php-src/ext/exif/exif.c:1.165 Fri Jan 21 19:01:33 2005 +++ php-src/ext/exif/exif.c Tue Feb 1 18:27:33 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.165 2005/01/22 00:01:33 andrei Exp $ */ +/* $Id: exif.c,v 1.166 2005/02/01 23:27:33 iliaa Exp $ */ /* ToDos * @@ -93,7 +93,7 @@ #define EFREE_IF(ptr) if (ptr) efree(ptr) -#define MAX_IFD_NESTING_LEVEL 5 +#define MAX_IFD_NESTING_LEVEL 25 static ZEND_BEGIN_ARG_INFO(exif_thumbnail_force_ref, 1) @@ -112,7 +112,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.165 2005/01/22 00:01:33 andrei Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.166 2005/02/01 23:27:33 iliaa Exp $ /* {{{ PHP_MINFO_FUNCTION */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
andrei Fri Jan 21 19:01:33 2005 EDT Modified files: /php-src/ext/exif exif.c Log: MFB (bugfix for 24851) http://cvs.php.net/diff.php/php-src/ext/exif/exif.c?r1=1.164r2=1.165ty=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.164 php-src/ext/exif/exif.c:1.165 --- php-src/ext/exif/exif.c:1.164 Tue Nov 9 20:43:04 2004 +++ php-src/ext/exif/exif.c Fri Jan 21 19:01:33 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.164 2004/11/10 01:43:04 iliaa Exp $ */ +/* $Id: exif.c,v 1.165 2005/01/22 00:01:33 andrei Exp $ */ /* ToDos * @@ -93,12 +93,13 @@ #define EFREE_IF(ptr) if (ptr) efree(ptr) +#define MAX_IFD_NESTING_LEVEL 5 + static ZEND_BEGIN_ARG_INFO(exif_thumbnail_force_ref, 1) ZEND_ARG_PASS_INFO(0) ZEND_END_ARG_INFO(); - /* {{{ exif_functions[] */ function_entry exif_functions[] = { @@ -111,7 +112,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.164 2004/11/10 01:43:04 iliaa Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.165 2005/01/22 00:01:33 andrei Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -1442,6 +1443,7 @@ /* for parsing */ int read_thumbnail; int read_all; + int ifd_nesting_level; /* internal */ file_section_list file; } image_info_type; @@ -2711,6 +2713,13 @@ size_t byte_count, offset_val, fpos, fgot; xp_field_type *tmp_xp; + /* Protect against corrupt headers */ + if (ImageInfo-ifd_nesting_level MAX_IFD_NESTING_LEVEL) { + exif_error_docref(exif_read_data#error_ifd TSRMLS_CC, ImageInfo, E_WARNING, corrupt EXIF header: maximum directory nesting level reached); + return FALSE; + } + ImageInfo-ifd_nesting_level++; + tag = php_ifd_get16u(dir_entry, ImageInfo-motorola_intel); format = php_ifd_get16u(dir_entry+2, ImageInfo-motorola_intel); components = php_ifd_get32u(dir_entry+4, ImageInfo-motorola_intel); @@ -3739,6 +3748,8 @@ } } + ImageInfo-ifd_nesting_level = 0; + /* Scan the JPEG headers. */ ret = exif_scan_FILE_header(ImageInfo TSRMLS_CC); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
iliaa Tue Nov 9 20:43:08 2004 EDT Modified files: /php-src/ext/exif exif.c Log: Fixed possible overflow. http://cvs.php.net/diff.php/php-src/ext/exif/exif.c?r1=1.163r2=1.164ty=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.163 php-src/ext/exif/exif.c:1.164 --- php-src/ext/exif/exif.c:1.163 Thu Nov 4 15:13:30 2004 +++ php-src/ext/exif/exif.c Tue Nov 9 20:43:04 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.163 2004/11/04 20:13:30 helly Exp $ */ +/* $Id: exif.c,v 1.164 2004/11/10 01:43:04 iliaa Exp $ */ /* ToDos * @@ -111,7 +111,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.163 2004/11/04 20:13:30 helly Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.164 2004/11/10 01:43:04 iliaa Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -3776,7 +3776,7 @@ } } for (i=0; iSECTION_COUNT; i++) { - sprintf(tmp, ,%s,, exif_get_sectionname(i)); + snprintf(tmp, sizeof(tmp), ,%s,, exif_get_sectionname(i)); if (strstr(sections_str, tmp)) { sections_needed |= 1i; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
helly Thu Nov 4 15:13:31 2004 EDT Modified files: /php-src/ext/exif exif.c Log: Bug #30627 http://cvs.php.net/diff.php/php-src/ext/exif/exif.c?r1=1.162r2=1.163ty=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.162 php-src/ext/exif/exif.c:1.163 --- php-src/ext/exif/exif.c:1.162 Tue Mar 16 15:58:01 2004 +++ php-src/ext/exif/exif.c Thu Nov 4 15:13:30 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.162 2004/03/16 20:58:01 derick Exp $ */ +/* $Id: exif.c,v 1.163 2004/11/04 20:13:30 helly Exp $ */ /* ToDos * @@ -111,7 +111,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.162 2004/03/16 20:58:01 derick Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.163 2004/11/04 20:13:30 helly Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -2734,7 +2734,7 @@ // JPEG does not use absolute pointers instead its pointers are relative to the start // of the TIFF header in APP1 section. */ - if (offset_val+byte_countImageInfo-FileSize || (ImageInfo-FileType!=IMAGE_FILETYPE_TIFF_II ImageInfo-FileType!=IMAGE_FILETYPE_TIFF_MM)) { + if (offset_val+byte_countImageInfo-FileSize || (ImageInfo-FileType!=IMAGE_FILETYPE_TIFF_II ImageInfo-FileType!=IMAGE_FILETYPE_TIFF_MM ImageInfo-FileType!=IMAGE_FILETYPE_JPEG)) { if (value_ptr dir_entry) { /* we can read this if offset_val 0 */ /* some files have their values in other parts of the file */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
derick Tue Mar 16 15:58:02 2004 EDT Modified files: /php-src/ext/exif exif.c Log: - Fixed typo http://cvs.php.net/diff.php/php-src/ext/exif/exif.c?r1=1.161r2=1.162ty=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.161 php-src/ext/exif/exif.c:1.162 --- php-src/ext/exif/exif.c:1.161 Thu Jan 8 03:15:20 2004 +++ php-src/ext/exif/exif.c Tue Mar 16 15:58:01 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.161 2004/01/08 08:15:20 andi Exp $ */ +/* $Id: exif.c,v 1.162 2004/03/16 20:58:01 derick Exp $ */ /* ToDos * @@ -111,7 +111,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.161 2004/01/08 08:15:20 andi Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.162 2004/03/16 20:58:01 derick Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -2862,7 +2862,7 @@ case TAG_FNUMBER: /* Simplest way of expressing aperture, so I trust it the most. - (overwrite previously computd value if there is one) */ + (overwrite previously computed value if there is one) */ ImageInfo-ApertureFNumber = (float)exif_convert_any_format(value_ptr, format, ImageInfo-motorola_intel TSRMLS_CC); break; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
helly Wed Dec 17 04:07:13 2003 EDT Modified files: /php-src/ext/exif exif.c Log: Fix warning Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.159 php-src/ext/exif/exif.c:1.160 --- php-src/ext/exif/exif.c:1.159 Wed Dec 10 16:23:33 2003 +++ php-src/ext/exif/exif.c Wed Dec 17 04:07:11 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.159 2003/12/10 21:23:33 iliaa Exp $ */ +/* $Id: exif.c,v 1.160 2003/12/17 09:07:11 helly Exp $ */ /* ToDos * @@ -111,7 +111,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.159 2003/12/10 21:23:33 iliaa Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.160 2003/12/17 09:07:11 helly Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -1628,7 +1628,7 @@ } else { info_value = info_data-value; } - for (idex=0,vptr=value; idexlength; idex++,vptr=(char *) vptr + php_tiff_bytes_per_format[format]) { + for (idex=0,vptr=value; idex(size_t)length; idex++,vptr=(char *) vptr + php_tiff_bytes_per_format[format]) { if (length1) { info_value = info_data-value.list[idex]; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c /ext/standard ftp_fopen_wrapper.c php_string.h string.c
iliaa Wed Dec 10 16:23:36 2003 EDT Modified files: /php-src/ext/exif exif.c /php-src/ext/standard ftp_fopen_wrapper.c string.c php_string.h Log: Fixed ZTS build. Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.158 php-src/ext/exif/exif.c:1.159 --- php-src/ext/exif/exif.c:1.158 Mon Sep 22 19:27:51 2003 +++ php-src/ext/exif/exif.c Wed Dec 10 16:23:33 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.158 2003/09/22 23:27:51 iliaa Exp $ */ +/* $Id: exif.c,v 1.159 2003/12/10 21:23:33 iliaa Exp $ */ /* ToDos * @@ -111,7 +111,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.158 2003/09/22 23:27:51 iliaa Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.159 2003/12/10 21:23:33 iliaa Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -3712,7 +3712,7 @@ return FALSE; } - php_basename(FileName, strlen(FileName), NULL, 0, (ImageInfo-FileName), NULL); + php_basename(FileName, strlen(FileName), NULL, 0, (ImageInfo-FileName), NULL TSRMLS_CC); ImageInfo-read_thumbnail = read_thumbnail; ImageInfo-read_all = read_all; ImageInfo-Thumbnail.filetype = IMAGE_FILETYPE_UNKNOWN; Index: php-src/ext/standard/ftp_fopen_wrapper.c diff -u php-src/ext/standard/ftp_fopen_wrapper.c:1.67 php-src/ext/standard/ftp_fopen_wrapper.c:1.68 --- php-src/ext/standard/ftp_fopen_wrapper.c:1.67 Wed Dec 10 02:15:28 2003 +++ php-src/ext/standard/ftp_fopen_wrapper.cWed Dec 10 16:23:34 2003 @@ -18,7 +18,7 @@ | Sara Golemon [EMAIL PROTECTED] | +--+ */ -/* $Id: ftp_fopen_wrapper.c,v 1.67 2003/12/10 07:15:28 moriyoshi Exp $ */ +/* $Id: ftp_fopen_wrapper.c,v 1.68 2003/12/10 21:23:34 iliaa Exp $ */ #include php.h #include php_globals.h @@ -576,7 +576,7 @@ return 0; } - php_basename(ent-d_name, tmp_len, NULL, 0, basename, basename_len); + php_basename(ent-d_name, tmp_len, NULL, 0, basename, basename_len TSRMLS_CC); if (!basename) { return 0; } Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.406 php-src/ext/standard/string.c:1.407 --- php-src/ext/standard/string.c:1.406 Wed Dec 10 02:15:28 2003 +++ php-src/ext/standard/string.c Wed Dec 10 16:23:35 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.406 2003/12/10 07:15:28 moriyoshi Exp $ */ +/* $Id: string.c,v 1.407 2003/12/10 21:23:35 iliaa Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -1068,7 +1068,7 @@ /* {{{ php_basename */ -PHPAPI void php_basename(char *s, size_t len, char *suffix, size_t sufflen, char **p_ret, size_t *p_len) +PHPAPI void php_basename(char *s, size_t len, char *suffix, size_t sufflen, char **p_ret, size_t *p_len TSRMLS_DC) { char *ret = NULL, *c, *comp, *cend; size_t inc_len, cnt; @@ -1146,7 +1146,7 @@ return; } - php_basename(string, string_len, suffix, suffix_len, ret, ret_len); + php_basename(string, string_len, suffix, suffix_len, ret, ret_len TSRMLS_CC); RETURN_STRINGL(ret, (int)ret_len, 0); } /* }}} */ @@ -1265,7 +1265,7 @@ } if ((opt PHP_PATHINFO_BASENAME) == PHP_PATHINFO_BASENAME) { - php_basename(path, path_len, NULL, 0, ret, ret_len); + php_basename(path, path_len, NULL, 0, ret, ret_len TSRMLS_CC); add_assoc_stringl(tmp, basename, ret, ret_len, 0); } @@ -1276,7 +1276,7 @@ /* Have we alrady looked up the basename? */ if (!have_basename) { - php_basename(path, path_len, NULL, 0, ret, ret_len); + php_basename(path, path_len, NULL, 0, ret, ret_len TSRMLS_CC); } p = strrchr(ret, '.'); Index: php-src/ext/standard/php_string.h diff -u php-src/ext/standard/php_string.h:1.82 php-src/ext/standard/php_string.h:1.83 --- php-src/ext/standard/php_string.h:1.82 Wed Dec 10 02:15:28 2003 +++ php-src/ext/standard/php_string.h Wed Dec 10 16:23:35 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_string.h,v 1.82 2003/12/10 07:15:28 moriyoshi Exp $ */ +/* $Id: php_string.h,v 1.83 2003/12/10 21:23:35 iliaa Exp $ */ /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */ @@ -122,7 +122,7 @@ PHPAPI char *php_addcslashes(char *str, int length, int *new_length, int freeit, char *what, int wlength TSRMLS_DC); PHPAPI void php_stripslashes(char *str, int *len TSRMLS_DC); PHPAPI void php_stripcslashes(char *str, int *len); -PHPAPI void php_basename(char *str, size_t
[PHP-CVS] cvs: php-src /ext/exif exif.c /ext/mysql php_mysql.c
iliaa Mon Sep 22 19:27:53 2003 EDT Modified files: /php-src/ext/exif exif.c /php-src/ext/mysql php_mysql.c Log: String format stuff. Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.157 php-src/ext/exif/exif.c:1.158 --- php-src/ext/exif/exif.c:1.157 Sun Sep 7 19:46:33 2003 +++ php-src/ext/exif/exif.c Mon Sep 22 19:27:51 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.157 2003/09/07 23:46:33 helly Exp $ */ +/* $Id: exif.c,v 1.158 2003/09/22 23:27:51 iliaa Exp $ */ /* ToDos * @@ -111,7 +111,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.157 2003/09/07 23:46:33 helly Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.158 2003/09/22 23:27:51 iliaa Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -255,10 +255,10 @@ static const char * EXIF_ERROR_THUMBEOF = Thumbnail goes IFD boundary or end of file reached; static const char * EXIF_ERROR_FSREALLOC = Illegal reallocating of undefined file section; -#define EXIF_ERRLOG_FILEEOF(ImageInfo)exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, EXIF_ERROR_FILEEOF); -#define EXIF_ERRLOG_CORRUPT(ImageInfo)exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, EXIF_ERROR_CORRUPT); -#define EXIF_ERRLOG_THUMBEOF(ImageInfo) exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, EXIF_ERROR_THUMBEOF); -#define EXIF_ERRLOG_FSREALLOC(ImageInfo) exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, EXIF_ERROR_FSREALLOC); +#define EXIF_ERRLOG_FILEEOF(ImageInfo)exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, %s, EXIF_ERROR_FILEEOF); +#define EXIF_ERRLOG_CORRUPT(ImageInfo)exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, %s, EXIF_ERROR_CORRUPT); +#define EXIF_ERRLOG_THUMBEOF(ImageInfo) exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, %s, EXIF_ERROR_THUMBEOF); +#define EXIF_ERRLOG_FSREALLOC(ImageInfo) exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, %s, EXIF_ERROR_FSREALLOC); /* }}} */ /* {{{ format description defines Index: php-src/ext/mysql/php_mysql.c diff -u php-src/ext/mysql/php_mysql.c:1.199 php-src/ext/mysql/php_mysql.c:1.200 --- php-src/ext/mysql/php_mysql.c:1.199 Thu Aug 28 15:17:34 2003 +++ php-src/ext/mysql/php_mysql.c Mon Sep 22 19:27:51 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_mysql.c,v 1.199 2003/08/28 19:17:34 iliaa Exp $ */ +/* $Id: php_mysql.c,v 1.200 2003/09/22 23:27:51 iliaa Exp $ */ /* TODO: * @@ -425,9 +425,7 @@ { if (MySG(trace_mode)) { if (MySG(result_allocated)){ - char tmp[128]; - sprintf((char *)tmp, %lu result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query(), MySG(result_allocated)); - php_error_docref(function.mysql-free-result TSRMLS_CC, E_WARNING, tmp); + php_error_docref(function.mysql-free-result TSRMLS_CC, E_WARNING, %lu result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query(), MySG(result_allocated)); } } @@ -1239,7 +1237,7 @@ mysql_real_query(mysql-conn, newquery, strlen(newquery)); efree (newquery); if (mysql_errno(mysql-conn)) { - php_error_docref(http://www.mysql.com/doc; TSRMLS_CC, E_WARNING, mysql_error(mysql-conn)); + php_error_docref(http://www.mysql.com/doc; TSRMLS_CC, E_WARNING, %s, mysql_error(mysql-conn)); RETURN_FALSE; } else { @@ -1272,7 +1270,7 @@ /* check possible error */ if (MySG(trace_mode)){ if (mysql_errno(mysql-conn)){ - php_error_docref(http://www.mysql.com/doc; TSRMLS_CC, E_WARNING, mysql_error(mysql-conn)); + php_error_docref(http://www.mysql.com/doc; TSRMLS_CC, E_WARNING, %s, mysql_error(mysql-conn)); } } RETURN_FALSE; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c
helly Sun Aug 17 14:21:35 2003 EDT Modified files: /php-src/ext/exif exif.c Log: Fix warnings Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.155 php-src/ext/exif/exif.c:1.156 --- php-src/ext/exif/exif.c:1.155 Sun Aug 17 11:04:57 2003 +++ php-src/ext/exif/exif.c Sun Aug 17 14:21:35 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.155 2003/08/17 15:04:57 sas Exp $ */ +/* $Id: exif.c,v 1.156 2003/08/17 18:21:35 helly Exp $ */ /* ToDos * @@ -111,7 +111,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.155 2003/08/17 15:04:57 sas Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.156 2003/08/17 18:21:35 helly Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -1313,7 +1313,7 @@ return ; } -static const tag_table_type exif_get_tag_table(int section) +static tag_table_type exif_get_tag_table(int section) { switch(section) { case SECTION_FILE: return tag_table_IFD[0]; @@ -1547,7 +1547,7 @@ /* {{{ exif_iif_add_value Add a value to image_info */ -static void exif_iif_add_value(image_info_type *image_info, int section_index, char *name, int tag, int format, size_t length, void* value, int motorola_intel TSRMLS_DC) +static void exif_iif_add_value(image_info_type *image_info, int section_index, char *name, int tag, int format, int length, void* value, int motorola_intel TSRMLS_DC) { size_t idex; void *vptr; @@ -1574,7 +1574,7 @@ if (value) { length = php_strnlen(value, length); if (PG(magic_quotes_runtime)) { - info_value-s = php_addslashes(value, length, (int *) length, 0 TSRMLS_CC); + info_value-s = php_addslashes(value, length, length, 0 TSRMLS_CC); } else { info_value-s = estrndup(value, length); } @@ -1601,7 +1601,7 @@ if (value) { /* do not recompute length here */ if (PG(magic_quotes_runtime)) { - info_value-s = php_addslashes(value, length, (int *) length, 0 TSRMLS_CC); + info_value-s = php_addslashes(value, length, length, 0 TSRMLS_CC); } else { info_value-s = estrndup(value, length); } @@ -1684,7 +1684,7 @@ */ static void exif_iif_add_tag(image_info_type *image_info, int section_index, char *name, int tag, int format, size_t length, void* value TSRMLS_DC) { - exif_iif_add_value(image_info, section_index, name, tag, format, length, value, image_info-motorola_intel TSRMLS_CC); + exif_iif_add_value(image_info, section_index, name, tag, format, (int)length, value, image_info-motorola_intel TSRMLS_CC); } /* }}} */ @@ -3004,7 +3004,7 @@ NumDirEntries = php_ifd_get16u(dir_start, ImageInfo-motorola_intel); if ((dir_start+2+NumDirEntries*12) (offset_base+IFDlength)) { - exif_error_docref(exif_read_data#error_ifd EXIFERR_CC, ImageInfo, E_WARNING, Illegal IFD size: x%04X + 2 + x%04X*12 = x%04X x%04X, (int)dir_start+2-(int)offset_base, NumDirEntries, (int)dir_start+2+NumDirEntries*12-(int)offset_base, IFDlength); + exif_error_docref(exif_read_data#error_ifd EXIFERR_CC, ImageInfo, E_WARNING, Illegal IFD size: x%04X + 2 + x%04X*12 = x%04X x%04X, (int)((size_t)dir_start+2-(size_t)offset_base), NumDirEntries, (int)((size_t)dir_start+2+NumDirEntries*12-(size_t)offset_base), IFDlength); return FALSE; } @@ -3201,7 +3201,7 @@ Data[0] = (uchar)lh; Data[1] = (uchar)ll; - got = php_stream_read(ImageInfo-infile, Data+2, itemlen-2); /* Read the whole section. */ + got = php_stream_read(ImageInfo-infile, (char*)(Data+2), itemlen-2); /* Read the whole section. */ if (got != itemlen-2) { exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, Error reading from file: got=x%04X(=%d) != itemlen-2=x%04X(=%d), got, got, itemlen-2, itemlen-2); return FALSE; @@ -3219,7 +3219,7 @@ size = ImageInfo-FileSize - fpos; sn = exif_file_sections_add(ImageInfo, M_PSEUDO, size, NULL); Data = ImageInfo-file.list[sn].data; - got = php_stream_read(ImageInfo-infile, Data, size); + got = php_stream_read(ImageInfo-infile, (char*)Data, size); if (got