Skip to content

Commit 49327e2

Browse files
committed
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
2 parents 43a1363 + 650115c commit 49327e2

8 files changed

+122
-123
lines changed

ext/exif/exif.c

+92-43
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ ZEND_BEGIN_MODULE_GLOBALS(exif)
105105
char * encode_jis;
106106
char * decode_jis_be;
107107
char * decode_jis_le;
108+
HashTable *tag_table_cache;
108109
ZEND_END_MODULE_GLOBALS(exif)
109110

110111
ZEND_DECLARE_MODULE_GLOBALS(exif)
@@ -170,6 +171,7 @@ static PHP_GINIT_FUNCTION(exif)
170171
exif_globals->encode_jis = NULL;
171172
exif_globals->decode_jis_be = NULL;
172173
exif_globals->decode_jis_le = NULL;
174+
exif_globals->tag_table_cache = NULL;
173175
}
174176
/* }}} */
175177

@@ -192,6 +194,10 @@ PHP_MINIT_FUNCTION(exif)
192194
PHP_MSHUTDOWN_FUNCTION(exif)
193195
{
194196
UNREGISTER_INI_ENTRIES();
197+
if (EXIF_G(tag_table_cache)) {
198+
zend_hash_destroy(EXIF_G(tag_table_cache));
199+
free(EXIF_G(tag_table_cache));
200+
}
195201
return SUCCESS;
196202
}
197203
/* }}} */
@@ -694,7 +700,6 @@ static tag_info_array tag_table_IFD = {
694700
{ 0x8773, "ICC_Profile"},
695701
{ 0x8822, "ExposureProgram"},
696702
{ 0x8824, "SpectralSensity"},
697-
{ 0x8828, "OECF"},
698703
{ 0x8825, "GPS_IFD_Pointer"},
699704
{ 0x8827, "ISOSpeedRatings"},
700705
{ 0x8828, "OECF"},
@@ -1323,40 +1328,72 @@ static const maker_note_type maker_note_array[] = {
13231328
};
13241329
/* }}} */
13251330

1326-
/* {{{ exif_get_tagname
1327-
Get headername for tag_num or NULL if not defined */
1328-
static char * exif_get_tagname(int tag_num, char *ret, int len, tag_table_type tag_table)
1331+
static HashTable *exif_make_tag_ht(tag_info_type *tag_table)
13291332
{
1330-
int i, t;
1331-
char tmp[32];
1332-
1333-
for (i = 0; (t = tag_table[i].Tag) != TAG_END_OF_LIST; i++) {
1334-
if (t == tag_num) {
1335-
if (ret && len) {
1336-
strlcpy(ret, tag_table[i].Desc, abs(len));
1337-
if (len < 0) {
1338-
memset(ret + strlen(ret), ' ', -len - strlen(ret) - 1);
1339-
ret[-len - 1] = '\0';
1340-
}
1341-
return ret;
1342-
}
1343-
return tag_table[i].Desc;
1333+
HashTable *ht = malloc(sizeof(HashTable));
1334+
zend_hash_init(ht, 0, NULL, NULL, 1);
1335+
while (tag_table->Tag != TAG_END_OF_LIST) {
1336+
if (!zend_hash_index_add_ptr(ht, tag_table->Tag, tag_table->Desc)) {
1337+
zend_error(E_CORE_ERROR, "Duplicate tag %x", tag_table->Tag);
13441338
}
1339+
tag_table++;
13451340
}
1341+
return ht;
1342+
}
13461343

1347-
if (ret && len) {
1348-
snprintf(tmp, sizeof(tmp), "UndefinedTag:0x%04X", tag_num);
1349-
strlcpy(ret, tmp, abs(len));
1350-
if (len < 0) {
1351-
memset(ret + strlen(ret), ' ', -len - strlen(ret) - 1);
1352-
ret[-len - 1] = '\0';
1353-
}
1354-
return ret;
1344+
static void exif_tag_ht_dtor(zval *zv)
1345+
{
1346+
HashTable *ht = Z_PTR_P(zv);
1347+
zend_hash_destroy(ht);
1348+
free(ht);
1349+
}
1350+
1351+
static HashTable *exif_get_tag_ht(tag_info_type *tag_table)
1352+
{
1353+
HashTable *ht;
1354+
1355+
if (!EXIF_G(tag_table_cache)) {
1356+
EXIF_G(tag_table_cache) = malloc(sizeof(HashTable));
1357+
zend_hash_init(EXIF_G(tag_table_cache), 0, NULL, exif_tag_ht_dtor, 1);
13551358
}
1356-
return "";
1359+
1360+
ht = zend_hash_index_find_ptr(EXIF_G(tag_table_cache), (uintptr_t) tag_table);
1361+
if (ht) {
1362+
return ht;
1363+
}
1364+
1365+
ht = exif_make_tag_ht(tag_table);
1366+
zend_hash_index_add_new_ptr(EXIF_G(tag_table_cache), (uintptr_t) tag_table, ht);
1367+
return ht;
1368+
}
1369+
1370+
/* {{{ exif_get_tagname
1371+
Get headername for tag_num or NULL if not defined */
1372+
static char *exif_get_tagname(int tag_num, tag_table_type tag_table)
1373+
{
1374+
return zend_hash_index_find_ptr(exif_get_tag_ht(tag_table), tag_num);
13571375
}
13581376
/* }}} */
13591377

1378+
static char *exif_get_tagname_debug(int tag_num, tag_table_type tag_table)
1379+
{
1380+
char *desc = zend_hash_index_find_ptr(exif_get_tag_ht(tag_table), tag_num);
1381+
if (desc) {
1382+
return desc;
1383+
}
1384+
return "UndefinedTag";
1385+
}
1386+
1387+
static char *exif_get_tagname_key(int tag_num, char *buf, size_t buf_size, tag_table_type tag_table)
1388+
{
1389+
char *desc = zend_hash_index_find_ptr(exif_get_tag_ht(tag_table), tag_num);
1390+
if (desc) {
1391+
return desc;
1392+
}
1393+
snprintf(buf, buf_size, "UndefinedTag:0x%04X", tag_num);
1394+
return buf;
1395+
}
1396+
13601397
/* {{{ exif_char_dump
13611398
* Do not use! This is a debug function... */
13621399
#ifdef EXIF_DEBUG
@@ -1912,16 +1949,29 @@ typedef struct {
19121949
int read_thumbnail;
19131950
int read_all;
19141951
int ifd_nesting_level;
1952+
int num_errors;
19151953
/* internal */
19161954
file_section_list file;
19171955
} image_info_type;
19181956
/* }}} */
19191957

1958+
#define EXIF_MAX_ERRORS 10
1959+
19201960
/* {{{ exif_error_docref */
1921-
static void exif_error_docref(const char *docref EXIFERR_DC, const image_info_type *ImageInfo, int type, const char *format, ...)
1961+
static void exif_error_docref(const char *docref EXIFERR_DC, image_info_type *ImageInfo, int type, const char *format, ...)
19221962
{
19231963
va_list args;
19241964

1965+
if (ImageInfo) {
1966+
if (++ImageInfo->num_errors > EXIF_MAX_ERRORS) {
1967+
if (ImageInfo->num_errors == EXIF_MAX_ERRORS+1) {
1968+
php_error_docref(docref, type,
1969+
"Further exif parsing errors have been suppressed");
1970+
}
1971+
return;
1972+
}
1973+
}
1974+
19251975
va_start(args, format);
19261976
#ifdef EXIF_DEBUG
19271977
{
@@ -2335,7 +2385,7 @@ static void add_assoc_image_info(zval *value, int sub_array, image_info_type *im
23352385
name = uname;
23362386
}
23372387
#ifdef EXIF_DEBUG
2338-
/* 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));*/
2388+
/* 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));*/
23392389
#endif
23402390
if (info_data->length==0) {
23412391
add_assoc_null(&tmpi, name);
@@ -2655,9 +2705,8 @@ PHP_FUNCTION(exif_tagname)
26552705
return;
26562706
}
26572707

2658-
szTemp = exif_get_tagname(tag, NULL, 0, tag_table_IFD);
2659-
2660-
if (tag < 0 || !szTemp || !szTemp[0]) {
2708+
szTemp = exif_get_tagname(tag, tag_table_IFD);
2709+
if (tag < 0 || !szTemp) {
26612710
RETURN_FALSE;
26622711
}
26632712

@@ -2798,7 +2847,7 @@ static void exif_thumbnail_build(image_info_type *ImageInfo) {
27982847
info_data = &info_list->list[i];
27992848
byte_count = php_tiff_bytes_per_format[info_data->format] * info_data->length;
28002849
#ifdef EXIF_DEBUG
2801-
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);
2850+
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);
28022851
#endif
28032852
if (info_data->tag==TAG_STRIP_OFFSETS || info_data->tag==TAG_JPEG_INTERCHANGE_FORMAT) {
28042853
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
31433192

31443193
#define REQUIRE_NON_EMPTY() do { \
31453194
if (byte_count == 0) { \
3146-
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)); \
3195+
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)); \
31473196
return FALSE; \
31483197
} \
31493198
} while (0)
@@ -3177,15 +3226,15 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
31773226

31783227
if (!format || format > NUM_FORMATS) {
31793228
/* (-1) catches illegal zero case as unsigned underflows to positive large. */
3180-
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);
3229+
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);
31813230
format = TAG_FMT_BYTE;
31823231
/*return TRUE;*/
31833232
}
31843233

31853234
byte_count_signed = (int64_t)components * php_tiff_bytes_per_format[format];
31863235

31873236
if (byte_count_signed < 0 || (byte_count_signed > INT32_MAX)) {
3188-
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));
3237+
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));
31893238
return FALSE;
31903239
}
31913240

@@ -3208,11 +3257,11 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
32083257
if (value_ptr < dir_entry) {
32093258
/* we can read this if offset_val > 0 */
32103259
/* some files have their values in other parts of the file */
3211-
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);
3260+
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);
32123261
} else {
32133262
/* this is for sure not allowed */
32143263
/* exception are IFD pointers */
3215-
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);
3264+
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);
32163265
}
32173266
return FALSE;
32183267
}
@@ -3255,7 +3304,7 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
32553304
ImageInfo->sections_found |= FOUND_ANY_TAG;
32563305
#ifdef EXIF_DEBUG
32573306
dump_data = exif_dump_data(&dump_free, format, components, length, ImageInfo->motorola_intel, value_ptr);
3258-
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);
3307+
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);
32593308
if (dump_free) {
32603309
efree(dump_data);
32613310
}
@@ -3484,7 +3533,7 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
34843533
}
34853534
}
34863535
}
3487-
exif_iif_add_tag(ImageInfo, section_index, exif_get_tagname(tag, tagname, sizeof(tagname), tag_table), tag, format, components, value_ptr, byte_count);
3536+
exif_iif_add_tag(ImageInfo, section_index, exif_get_tagname_key(tag, tagname, sizeof(tagname), tag_table), tag, format, components, value_ptr, byte_count);
34883537
EFREE_IF(outside);
34893538
return TRUE;
34903539
}
@@ -3922,7 +3971,6 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
39223971
{
39233972
int i, sn, num_entries, sub_section_index = 0;
39243973
unsigned char *dir_entry;
3925-
char tagname[64];
39263974
size_t ifd_size, dir_size, entry_offset, next_offset, entry_length, entry_value=0, fgot;
39273975
int entry_tag , entry_type;
39283976
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
39604008
entry_tag = php_ifd_get16u(dir_entry+0, ImageInfo->motorola_intel);
39614009
entry_type = php_ifd_get16u(dir_entry+2, ImageInfo->motorola_intel);
39624010
if (entry_type > NUM_FORMATS) {
3963-
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);
4011+
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);
39644012
/* Since this is repeated in exif_process_IFD_TAG make it a notice here */
39654013
/* and make it a warning in the exif_process_IFD_TAG which is called */
39664014
/* elsewhere. */
@@ -4310,6 +4358,7 @@ static int exif_read_from_impl(image_info_type *ImageInfo, php_stream *stream, i
43104358

43114359

43124360
ImageInfo->ifd_nesting_level = 0;
4361+
ImageInfo->num_errors = 0;
43134362

43144363
/* Scan the headers */
43154364
ret = exif_scan_FILE_header(ImageInfo);
@@ -4517,7 +4566,7 @@ PHP_FUNCTION(exif_read_data)
45174566
exif_iif_add_str(&ImageInfo, SECTION_COMPUTED, "Copyright.Editor", ImageInfo.CopyrightEditor);
45184567

45194568
for (i=0; i<ImageInfo.xp_fields.count; i++) {
4520-
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);
4569+
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);
45214570
}
45224571
if (ImageInfo.Thumbnail.size) {
45234572
if (read_thumbnail) {

ext/exif/tests/bug54002.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ exif_read_data(__DIR__ . '/bug54002_2.jpg');
1111

1212
?>
1313
--EXPECTF--
14-
Warning: exif_read_data(bug54002_1.jpg): Process tag(x0205=UndefinedTa): Illegal byte_count in %sbug54002.php on line %d
14+
Warning: exif_read_data(bug54002_1.jpg): Process tag(x0205=UndefinedTag): Illegal byte_count in %sbug54002.php on line %d
1515

16-
Warning: exif_read_data(bug54002_2.jpg): Process tag(x0205=UndefinedTa): Illegal byte_count in %sbug54002.php on line %d
16+
Warning: exif_read_data(bug54002_2.jpg): Process tag(x0205=UndefinedTag): Illegal byte_count in %sbug54002.php on line %d

ext/exif/tests/bug60150.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var_dump(exif_read_data($infile));
1212
?>
1313
===DONE===
1414
--EXPECTF--
15-
Warning: exif_read_data(bug60150.jpg): Process tag(x9003=DateTimeOri): Illegal pointer offset(%s) in %s on line %d
15+
Warning: exif_read_data(bug60150.jpg): Process tag(x9003=DateTimeOriginal): Illegal pointer offset(%s) in %s on line %d
1616

1717
Warning: exif_read_data(bug60150.jpg): Error reading from file: got=x%x(=%d) != itemlen-%d=x%x(=%d) in %s on line %d
1818

ext/exif/tests/bug72094.phpt

+12-12
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ print_r(exif_read_data(__DIR__ . '/bug72094_4.jpg'));
1111
?>
1212
DONE
1313
--EXPECTF--
14-
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
14+
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
1515

16-
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
16+
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
1717

18-
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
18+
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
1919

20-
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
20+
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
2121

22-
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
22+
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
2323

24-
Warning: exif_read_data(bug72094_1.jpg): Process tag(x8298=Copyright ): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
24+
Warning: exif_read_data(bug72094_1.jpg): Process tag(x8298=Copyright): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
2525

2626
Warning: exif_read_data(bug72094_1.jpg): Illegal IFD offset in %sbug72094.php on line %d
2727

@@ -35,17 +35,17 @@ Warning: exif_read_data(bug72094_2.jpg): File structure corrupted in %s%ebug7209
3535

3636
Warning: exif_read_data(bug72094_2.jpg): Invalid JPEG file in %s%ebug72094.php on line %d
3737

38-
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
38+
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
3939

40-
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
40+
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
4141

42-
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
42+
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
4343

44-
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
44+
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
4545

46-
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
46+
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
4747

48-
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
48+
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
4949

5050
Warning: exif_read_data(bug72094_3.jpg): Illegal IFD size in %s%ebug72094.php on line %d
5151

ext/exif/tests/bug73737.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Bug #73737 (Crash when parsing a tag format)
88
var_dump($exif);
99
?>
1010
--EXPECTF--
11-
Warning: exif_thumbnail(bug73737.tiff): Process tag(x0100=ImageWidth ): Cannot be empty in %s on line %d
11+
Warning: exif_thumbnail(bug73737.tiff): Process tag(x0100=ImageWidth): Cannot be empty in %s on line %d
1212

1313
Warning: exif_thumbnail(bug73737.tiff): Error in TIFF: filesize(x0030) less than start of IFD dir(x10102) in %s line %d
1414
bool(false)

0 commit comments

Comments
 (0)