From: foobar Date: Sun, 19 May 2002 00:03:34 +0000 (+0000) Subject: MFH X-Git-Tag: php-4.2.3RC1~128 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=641db909ff083d2a0a3f3868e5878b08dd73361d;p=php MFH --- diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c index bfd2f0552a..0b8366e110 100644 --- a/ext/domxml/php_domxml.c +++ b/ext/domxml/php_domxml.c @@ -2082,7 +2082,7 @@ PHP_FUNCTION(domxml_node_append_sibling) RETURN_FALSE; } - // FIXME reverted xmlAddChildList; crashes + /* FIXME reverted xmlAddChildList; crashes */ child = xmlAddSibling(nodep, new_child); if (NULL == child) { diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 16183ddaa6..5f5aa77403 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -1340,9 +1340,11 @@ static void exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, ch /* 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. + */ if (offset_val<0 || offset_val+byte_count>ImageInfo->FileSize || (ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_II && ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_MM)) { if (value_ptr < dir_entry) { /* we can read this if offset_val > 0 */ @@ -1356,7 +1358,7 @@ static void exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, ch return; } if ( byte_count>sizeof(cbuf)) { - // mark as outside range and get buffer + /* mark as outside range and get buffer */ value_ptr = emalloc(byte_count); if ( !value_ptr) { php_error(E_WARNING, "could not allocate data for entire image"); @@ -1364,11 +1366,13 @@ static void exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, ch } 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. + */ value_ptr = cbuf; } fpos = ftell(ImageInfo->infile);