mirror of
https://github.com/php/php-src.git
synced 2025-01-07 11:34:09 +08:00
Merge branch 'PHP-7.4'
* PHP-7.4: Improve exif tag name fetching Implement a cache for exif tag name lookups Limit the amount of errors generated during exif parsing
This commit is contained in:
commit
49327e2e15
139
ext/exif/exif.c
139
ext/exif/exif.c
@ -105,6 +105,7 @@ ZEND_BEGIN_MODULE_GLOBALS(exif)
|
||||
char * encode_jis;
|
||||
char * decode_jis_be;
|
||||
char * decode_jis_le;
|
||||
HashTable *tag_table_cache;
|
||||
ZEND_END_MODULE_GLOBALS(exif)
|
||||
|
||||
ZEND_DECLARE_MODULE_GLOBALS(exif)
|
||||
@ -170,6 +171,7 @@ static PHP_GINIT_FUNCTION(exif)
|
||||
exif_globals->encode_jis = NULL;
|
||||
exif_globals->decode_jis_be = NULL;
|
||||
exif_globals->decode_jis_le = NULL;
|
||||
exif_globals->tag_table_cache = NULL;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@ -192,6 +194,10 @@ PHP_MINIT_FUNCTION(exif)
|
||||
PHP_MSHUTDOWN_FUNCTION(exif)
|
||||
{
|
||||
UNREGISTER_INI_ENTRIES();
|
||||
if (EXIF_G(tag_table_cache)) {
|
||||
zend_hash_destroy(EXIF_G(tag_table_cache));
|
||||
free(EXIF_G(tag_table_cache));
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
@ -694,7 +700,6 @@ static tag_info_array tag_table_IFD = {
|
||||
{ 0x8773, "ICC_Profile"},
|
||||
{ 0x8822, "ExposureProgram"},
|
||||
{ 0x8824, "SpectralSensity"},
|
||||
{ 0x8828, "OECF"},
|
||||
{ 0x8825, "GPS_IFD_Pointer"},
|
||||
{ 0x8827, "ISOSpeedRatings"},
|
||||
{ 0x8828, "OECF"},
|
||||
@ -1323,40 +1328,72 @@ static const maker_note_type maker_note_array[] = {
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
static HashTable *exif_make_tag_ht(tag_info_type *tag_table)
|
||||
{
|
||||
HashTable *ht = malloc(sizeof(HashTable));
|
||||
zend_hash_init(ht, 0, NULL, NULL, 1);
|
||||
while (tag_table->Tag != TAG_END_OF_LIST) {
|
||||
if (!zend_hash_index_add_ptr(ht, tag_table->Tag, tag_table->Desc)) {
|
||||
zend_error(E_CORE_ERROR, "Duplicate tag %x", tag_table->Tag);
|
||||
}
|
||||
tag_table++;
|
||||
}
|
||||
return ht;
|
||||
}
|
||||
|
||||
static void exif_tag_ht_dtor(zval *zv)
|
||||
{
|
||||
HashTable *ht = Z_PTR_P(zv);
|
||||
zend_hash_destroy(ht);
|
||||
free(ht);
|
||||
}
|
||||
|
||||
static HashTable *exif_get_tag_ht(tag_info_type *tag_table)
|
||||
{
|
||||
HashTable *ht;
|
||||
|
||||
if (!EXIF_G(tag_table_cache)) {
|
||||
EXIF_G(tag_table_cache) = malloc(sizeof(HashTable));
|
||||
zend_hash_init(EXIF_G(tag_table_cache), 0, NULL, exif_tag_ht_dtor, 1);
|
||||
}
|
||||
|
||||
ht = zend_hash_index_find_ptr(EXIF_G(tag_table_cache), (uintptr_t) tag_table);
|
||||
if (ht) {
|
||||
return ht;
|
||||
}
|
||||
|
||||
ht = exif_make_tag_ht(tag_table);
|
||||
zend_hash_index_add_new_ptr(EXIF_G(tag_table_cache), (uintptr_t) tag_table, ht);
|
||||
return ht;
|
||||
}
|
||||
|
||||
/* {{{ exif_get_tagname
|
||||
Get headername for tag_num or NULL if not defined */
|
||||
static char * exif_get_tagname(int tag_num, char *ret, int len, tag_table_type tag_table)
|
||||
static char *exif_get_tagname(int tag_num, tag_table_type tag_table)
|
||||
{
|
||||
int i, t;
|
||||
char tmp[32];
|
||||
|
||||
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) {
|
||||
memset(ret + strlen(ret), ' ', -len - strlen(ret) - 1);
|
||||
ret[-len - 1] = '\0';
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
return tag_table[i].Desc;
|
||||
}
|
||||
}
|
||||
|
||||
if (ret && len) {
|
||||
snprintf(tmp, sizeof(tmp), "UndefinedTag:0x%04X", tag_num);
|
||||
strlcpy(ret, tmp, abs(len));
|
||||
if (len < 0) {
|
||||
memset(ret + strlen(ret), ' ', -len - strlen(ret) - 1);
|
||||
ret[-len - 1] = '\0';
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
return "";
|
||||
return zend_hash_index_find_ptr(exif_get_tag_ht(tag_table), tag_num);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static char *exif_get_tagname_debug(int tag_num, tag_table_type tag_table)
|
||||
{
|
||||
char *desc = zend_hash_index_find_ptr(exif_get_tag_ht(tag_table), tag_num);
|
||||
if (desc) {
|
||||
return desc;
|
||||
}
|
||||
return "UndefinedTag";
|
||||
}
|
||||
|
||||
static char *exif_get_tagname_key(int tag_num, char *buf, size_t buf_size, tag_table_type tag_table)
|
||||
{
|
||||
char *desc = zend_hash_index_find_ptr(exif_get_tag_ht(tag_table), tag_num);
|
||||
if (desc) {
|
||||
return desc;
|
||||
}
|
||||
snprintf(buf, buf_size, "UndefinedTag:0x%04X", tag_num);
|
||||
return buf;
|
||||
}
|
||||
|
||||
/* {{{ exif_char_dump
|
||||
* Do not use! This is a debug function... */
|
||||
#ifdef EXIF_DEBUG
|
||||
@ -1912,16 +1949,29 @@ typedef struct {
|
||||
int read_thumbnail;
|
||||
int read_all;
|
||||
int ifd_nesting_level;
|
||||
int num_errors;
|
||||
/* internal */
|
||||
file_section_list file;
|
||||
} image_info_type;
|
||||
/* }}} */
|
||||
|
||||
#define EXIF_MAX_ERRORS 10
|
||||
|
||||
/* {{{ exif_error_docref */
|
||||
static void exif_error_docref(const char *docref EXIFERR_DC, const image_info_type *ImageInfo, int type, const char *format, ...)
|
||||
static void exif_error_docref(const char *docref EXIFERR_DC, image_info_type *ImageInfo, int type, const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
if (ImageInfo) {
|
||||
if (++ImageInfo->num_errors > EXIF_MAX_ERRORS) {
|
||||
if (ImageInfo->num_errors == EXIF_MAX_ERRORS+1) {
|
||||
php_error_docref(docref, type,
|
||||
"Further exif parsing errors have been suppressed");
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
va_start(args, format);
|
||||
#ifdef EXIF_DEBUG
|
||||
{
|
||||
@ -2335,7 +2385,7 @@ static void add_assoc_image_info(zval *value, int sub_array, image_info_type *im
|
||||
name = uname;
|
||||
}
|
||||
#ifdef EXIF_DEBUG
|
||||
/* php_error_docref(NULL, 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)), info_data->length, info_data->format==TAG_FMT_STRING?(info_value&&info_value->s?info_value->s:"<no data>"):exif_get_tagformat(info_data->format));*/
|
||||
/* php_error_docref(NULL, E_NOTICE, "Adding infos: tag(0x%04X,%12s,L=0x%04X): %s", info_tag, exif_get_tagname_debug(info_tag, exif_get_tag_table(section_index)), info_data->length, info_data->format==TAG_FMT_STRING?(info_value&&info_value->s?info_value->s:"<no data>"):exif_get_tagformat(info_data->format));*/
|
||||
#endif
|
||||
if (info_data->length==0) {
|
||||
add_assoc_null(&tmpi, name);
|
||||
@ -2655,9 +2705,8 @@ PHP_FUNCTION(exif_tagname)
|
||||
return;
|
||||
}
|
||||
|
||||
szTemp = exif_get_tagname(tag, NULL, 0, tag_table_IFD);
|
||||
|
||||
if (tag < 0 || !szTemp || !szTemp[0]) {
|
||||
szTemp = exif_get_tagname(tag, tag_table_IFD);
|
||||
if (tag < 0 || !szTemp) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -2798,7 +2847,7 @@ static void exif_thumbnail_build(image_info_type *ImageInfo) {
|
||||
info_data = &info_list->list[i];
|
||||
byte_count = php_tiff_bytes_per_format[info_data->format] * info_data->length;
|
||||
#ifdef EXIF_DEBUG
|
||||
exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Thumbnail: process tag(x%04X=%s): %s%s (%d bytes)", info_data->tag, exif_get_tagname(info_data->tag, tagname, -12, tag_table_IFD), (info_data->length>1)&&info_data->format!=TAG_FMT_UNDEFINED&&info_data->format!=TAG_FMT_STRING?"ARRAY OF ":"", exif_get_tagformat(info_data->format), byte_count);
|
||||
exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Thumbnail: process tag(x%04X=%s): %s%s (%d bytes)", info_data->tag, exif_get_tagname_debug(info_data->tag, tag_table_IFD), (info_data->length>1)&&info_data->format!=TAG_FMT_UNDEFINED&&info_data->format!=TAG_FMT_STRING?"ARRAY OF ":"", exif_get_tagformat(info_data->format), byte_count);
|
||||
#endif
|
||||
if (info_data->tag==TAG_STRIP_OFFSETS || info_data->tag==TAG_JPEG_INTERCHANGE_FORMAT) {
|
||||
php_ifd_set16u(new_data + 0, info_data->tag, ImageInfo->motorola_intel);
|
||||
@ -3143,7 +3192,7 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
|
||||
|
||||
#define REQUIRE_NON_EMPTY() do { \
|
||||
if (byte_count == 0) { \
|
||||
exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Process tag(x%04X=%s): Cannot be empty", tag, exif_get_tagname(tag, tagname, -12, tag_table)); \
|
||||
exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Process tag(x%04X=%s): Cannot be empty", tag, exif_get_tagname_debug(tag, tag_table)); \
|
||||
return FALSE; \
|
||||
} \
|
||||
} while (0)
|
||||
@ -3177,7 +3226,7 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
|
||||
|
||||
if (!format || format > NUM_FORMATS) {
|
||||
/* (-1) catches illegal zero case as unsigned underflows to positive large. */
|
||||
exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Process tag(x%04X=%s): Illegal format code 0x%04X, suppose BYTE", tag, exif_get_tagname(tag, tagname, -12, tag_table), format);
|
||||
exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Process tag(x%04X=%s): Illegal format code 0x%04X, suppose BYTE", tag, exif_get_tagname_debug(tag, tag_table), format);
|
||||
format = TAG_FMT_BYTE;
|
||||
/*return TRUE;*/
|
||||
}
|
||||
@ -3185,7 +3234,7 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
|
||||
byte_count_signed = (int64_t)components * php_tiff_bytes_per_format[format];
|
||||
|
||||
if (byte_count_signed < 0 || (byte_count_signed > INT32_MAX)) {
|
||||
exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Process tag(x%04X=%s): Illegal byte_count", tag, exif_get_tagname(tag, tagname, -12, tag_table));
|
||||
exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Process tag(x%04X=%s): Illegal byte_count", tag, exif_get_tagname_debug(tag, tag_table));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -3208,11 +3257,11 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
|
||||
if (value_ptr < dir_entry) {
|
||||
/* we can read this if offset_val > 0 */
|
||||
/* some files have their values in other parts of the file */
|
||||
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)", tag, exif_get_tagname(tag, tagname, -12, tag_table), offset_val, dir_entry);
|
||||
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)", tag, exif_get_tagname_debug(tag, tag_table), offset_val, dir_entry);
|
||||
} else {
|
||||
/* this is for sure not allowed */
|
||||
/* 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), offset_val, byte_count, offset_val+byte_count, IFDlength);
|
||||
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_debug(tag, tag_table), offset_val, byte_count, offset_val+byte_count, IFDlength);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
@ -3255,7 +3304,7 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
|
||||
ImageInfo->sections_found |= FOUND_ANY_TAG;
|
||||
#ifdef EXIF_DEBUG
|
||||
dump_data = exif_dump_data(&dump_free, format, components, length, ImageInfo->motorola_intel, value_ptr);
|
||||
exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Process tag(x%04X=%s,@x%04X + x%04X(=%d)): %s%s %s", tag, exif_get_tagname(tag, tagname, -12, tag_table), offset_val+displacement, byte_count, byte_count, (components>1)&&format!=TAG_FMT_UNDEFINED&&format!=TAG_FMT_STRING?"ARRAY OF ":"", exif_get_tagformat(format), dump_data);
|
||||
exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Process tag(x%04X=%s,@x%04X + x%04X(=%d)): %s%s %s", tag, exif_get_tagname_debug(tag, tag_table), offset_val+displacement, byte_count, byte_count, (components>1)&&format!=TAG_FMT_UNDEFINED&&format!=TAG_FMT_STRING?"ARRAY OF ":"", exif_get_tagformat(format), dump_data);
|
||||
if (dump_free) {
|
||||
efree(dump_data);
|
||||
}
|
||||
@ -3484,7 +3533,7 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
|
||||
}
|
||||
}
|
||||
}
|
||||
exif_iif_add_tag(ImageInfo, section_index, exif_get_tagname(tag, tagname, sizeof(tagname), tag_table), tag, format, components, value_ptr, byte_count);
|
||||
exif_iif_add_tag(ImageInfo, section_index, exif_get_tagname_key(tag, tagname, sizeof(tagname), tag_table), tag, format, components, value_ptr, byte_count);
|
||||
EFREE_IF(outside);
|
||||
return TRUE;
|
||||
}
|
||||
@ -3922,7 +3971,6 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
|
||||
{
|
||||
int i, sn, num_entries, sub_section_index = 0;
|
||||
unsigned char *dir_entry;
|
||||
char tagname[64];
|
||||
size_t ifd_size, dir_size, entry_offset, next_offset, entry_length, entry_value=0, fgot;
|
||||
int entry_tag , entry_type;
|
||||
tag_table_type tag_table = exif_get_tag_table(section_index);
|
||||
@ -3960,7 +4008,7 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
|
||||
entry_tag = php_ifd_get16u(dir_entry+0, ImageInfo->motorola_intel);
|
||||
entry_type = php_ifd_get16u(dir_entry+2, ImageInfo->motorola_intel);
|
||||
if (entry_type > NUM_FORMATS) {
|
||||
exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Read from TIFF: tag(0x%04X,%12s): Illegal format code 0x%04X, switching to BYTE", entry_tag, exif_get_tagname(entry_tag, tagname, -12, tag_table), entry_type);
|
||||
exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Read from TIFF: tag(0x%04X,%12s): Illegal format code 0x%04X, switching to BYTE", entry_tag, exif_get_tagname_debug(entry_tag, tag_table), entry_type);
|
||||
/* Since this is repeated in exif_process_IFD_TAG make it a notice here */
|
||||
/* and make it a warning in the exif_process_IFD_TAG which is called */
|
||||
/* elsewhere. */
|
||||
@ -4310,6 +4358,7 @@ static int exif_read_from_impl(image_info_type *ImageInfo, php_stream *stream, i
|
||||
|
||||
|
||||
ImageInfo->ifd_nesting_level = 0;
|
||||
ImageInfo->num_errors = 0;
|
||||
|
||||
/* Scan the headers */
|
||||
ret = exif_scan_FILE_header(ImageInfo);
|
||||
@ -4517,7 +4566,7 @@ PHP_FUNCTION(exif_read_data)
|
||||
exif_iif_add_str(&ImageInfo, SECTION_COMPUTED, "Copyright.Editor", ImageInfo.CopyrightEditor);
|
||||
|
||||
for (i=0; i<ImageInfo.xp_fields.count; i++) {
|
||||
exif_iif_add_str(&ImageInfo, SECTION_WINXP, exif_get_tagname(ImageInfo.xp_fields.list[i].tag, NULL, 0, exif_get_tag_table(SECTION_WINXP)), ImageInfo.xp_fields.list[i].value);
|
||||
exif_iif_add_str(&ImageInfo, SECTION_WINXP, exif_get_tagname_debug(ImageInfo.xp_fields.list[i].tag, exif_get_tag_table(SECTION_WINXP)), ImageInfo.xp_fields.list[i].value);
|
||||
}
|
||||
if (ImageInfo.Thumbnail.size) {
|
||||
if (read_thumbnail) {
|
||||
|
@ -11,6 +11,6 @@ exif_read_data(__DIR__ . '/bug54002_2.jpg');
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: exif_read_data(bug54002_1.jpg): Process tag(x0205=UndefinedTa): Illegal byte_count in %sbug54002.php on line %d
|
||||
Warning: exif_read_data(bug54002_1.jpg): Process tag(x0205=UndefinedTag): Illegal byte_count in %sbug54002.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug54002_2.jpg): Process tag(x0205=UndefinedTa): Illegal byte_count in %sbug54002.php on line %d
|
||||
Warning: exif_read_data(bug54002_2.jpg): Process tag(x0205=UndefinedTag): Illegal byte_count in %sbug54002.php on line %d
|
||||
|
@ -12,7 +12,7 @@ var_dump(exif_read_data($infile));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Warning: exif_read_data(bug60150.jpg): Process tag(x9003=DateTimeOri): Illegal pointer offset(%s) in %s on line %d
|
||||
Warning: exif_read_data(bug60150.jpg): Process tag(x9003=DateTimeOriginal): Illegal pointer offset(%s) in %s on line %d
|
||||
|
||||
Warning: exif_read_data(bug60150.jpg): Error reading from file: got=x%x(=%d) != itemlen-%d=x%x(=%d) in %s on line %d
|
||||
|
||||
|
@ -11,17 +11,17 @@ print_r(exif_read_data(__DIR__ . '/bug72094_4.jpg'));
|
||||
?>
|
||||
DONE
|
||||
--EXPECTF--
|
||||
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_1.jpg): Process tag(x8298=Copyright ): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
Warning: exif_read_data(bug72094_1.jpg): Process tag(x8298=Copyright): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_1.jpg): Illegal IFD offset in %sbug72094.php on line %d
|
||||
|
||||
@ -35,17 +35,17 @@ Warning: exif_read_data(bug72094_2.jpg): File structure corrupted in %s%ebug7209
|
||||
|
||||
Warning: exif_read_data(bug72094_2.jpg): Invalid JPEG file in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_3.jpg): Illegal IFD size in %s%ebug72094.php on line %d
|
||||
|
||||
|
@ -8,7 +8,7 @@ Bug #73737 (Crash when parsing a tag format)
|
||||
var_dump($exif);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: exif_thumbnail(bug73737.tiff): Process tag(x0100=ImageWidth ): Cannot be empty in %s on line %d
|
||||
Warning: exif_thumbnail(bug73737.tiff): Process tag(x0100=ImageWidth): Cannot be empty in %s on line %d
|
||||
|
||||
Warning: exif_thumbnail(bug73737.tiff): Error in TIFF: filesize(x0030) less than start of IFD dir(x10102) in %s line %d
|
||||
bool(false)
|
||||
|
@ -8,72 +8,26 @@ var_dump(exif_read_data(__DIR__ . "/bug76557.jpg"));
|
||||
?>
|
||||
DONE
|
||||
--EXPECTF--
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x010F=Make ): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x010F=Make): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x8769=Exif_IFD_Po): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x927C=MakerNote ): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal pointer offset(%s) in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): File structure corrupted in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Invalid JPEG file in %sbug76557.php on line %d
|
||||
Warning: exif_read_data(): Further exif parsing errors have been suppressed in %s on line %d
|
||||
bool(false)
|
||||
DONE
|
||||
|
@ -4,13 +4,9 @@ Bug #77753 (Heap-buffer-overflow in php_ifd_get32s)
|
||||
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(exif_read_data(__DIR__."/bug77753.tiff"));
|
||||
@var_dump(exif_read_data(__DIR__."/bug77753.tiff"));
|
||||
?>
|
||||
DONE
|
||||
--EXPECTF--
|
||||
%A
|
||||
Warning: exif_read_data(bug77753.tiff): Illegal IFD size: 0x006A > 0x0065 in %sbug77753.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug77753.tiff): Invalid TIFF file in %sbug77753.php on line %d
|
||||
bool(false)
|
||||
DONE
|
||||
DONE
|
||||
|
@ -13,7 +13,7 @@ var_dump(exif_read_data(__DIR__ . '/tag_with_illegal_zero_components.jpeg'));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: exif_read_data(tag_with_illegal_zero_components.jpeg): Process tag(x0202=JPEGInterch): Cannot be empty in %s on line %d
|
||||
Warning: exif_read_data(tag_with_illegal_zero_components.jpeg): Process tag(x0202=JPEGInterchangeFormatLength): Cannot be empty in %s on line %d
|
||||
|
||||
Warning: exif_read_data(tag_with_illegal_zero_components.jpeg): File structure corrupted in %s on line %d
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user