Skip to content

Commit 650115c

Browse files
committed
Improve exif tag name fetching
1 parent 56e3e6f commit 650115c

File tree

7 files changed

+56
-62
lines changed

7 files changed

+56
-62
lines changed

ext/exif/exif.c

Lines changed: 29 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,34 +1396,30 @@ static HashTable *exif_get_tag_ht(tag_info_type *tag_table)
13961396

13971397
/* {{{ exif_get_tagname
13981398
Get headername for tag_num or NULL if not defined */
1399-
static char * exif_get_tagname(int tag_num, char *ret, int len, tag_table_type tag_table)
1399+
static char *exif_get_tagname(int tag_num, tag_table_type tag_table)
1400+
{
1401+
return zend_hash_index_find_ptr(exif_get_tag_ht(tag_table), tag_num);
1402+
}
1403+
/* }}} */
1404+
1405+
static char *exif_get_tagname_debug(int tag_num, tag_table_type tag_table)
14001406
{
1401-
char tmp[32];
14021407
char *desc = zend_hash_index_find_ptr(exif_get_tag_ht(tag_table), tag_num);
14031408
if (desc) {
1404-
if (ret && len) {
1405-
strlcpy(ret, desc, abs(len));
1406-
if (len < 0) {
1407-
memset(ret + strlen(ret), ' ', -len - strlen(ret) - 1);
1408-
ret[-len - 1] = '\0';
1409-
}
1410-
return ret;
1411-
}
14121409
return desc;
14131410
}
1411+
return "UndefinedTag";
1412+
}
14141413

1415-
if (ret && len) {
1416-
snprintf(tmp, sizeof(tmp), "UndefinedTag:0x%04X", tag_num);
1417-
strlcpy(ret, tmp, abs(len));
1418-
if (len < 0) {
1419-
memset(ret + strlen(ret), ' ', -len - strlen(ret) - 1);
1420-
ret[-len - 1] = '\0';
1421-
}
1422-
return ret;
1414+
static char *exif_get_tagname_key(int tag_num, char *buf, size_t buf_size, tag_table_type tag_table)
1415+
{
1416+
char *desc = zend_hash_index_find_ptr(exif_get_tag_ht(tag_table), tag_num);
1417+
if (desc) {
1418+
return desc;
14231419
}
1424-
return "";
1420+
snprintf(buf, buf_size, "UndefinedTag:0x%04X", tag_num);
1421+
return buf;
14251422
}
1426-
/* }}} */
14271423

14281424
/* {{{ exif_char_dump
14291425
* Do not use! This is a debug function... */
@@ -2416,7 +2412,7 @@ static void add_assoc_image_info(zval *value, int sub_array, image_info_type *im
24162412
name = uname;
24172413
}
24182414
#ifdef EXIF_DEBUG
2419-
/* 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));*/
2415+
/* 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));*/
24202416
#endif
24212417
if (info_data->length==0) {
24222418
add_assoc_null(&tmpi, name);
@@ -2736,9 +2732,8 @@ PHP_FUNCTION(exif_tagname)
27362732
return;
27372733
}
27382734

2739-
szTemp = exif_get_tagname(tag, NULL, 0, tag_table_IFD);
2740-
2741-
if (tag < 0 || !szTemp || !szTemp[0]) {
2735+
szTemp = exif_get_tagname(tag, tag_table_IFD);
2736+
if (tag < 0 || !szTemp) {
27422737
RETURN_FALSE;
27432738
}
27442739

@@ -2879,7 +2874,7 @@ static void exif_thumbnail_build(image_info_type *ImageInfo) {
28792874
info_data = &info_list->list[i];
28802875
byte_count = php_tiff_bytes_per_format[info_data->format] * info_data->length;
28812876
#ifdef EXIF_DEBUG
2882-
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);
2877+
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);
28832878
#endif
28842879
if (info_data->tag==TAG_STRIP_OFFSETS || info_data->tag==TAG_JPEG_INTERCHANGE_FORMAT) {
28852880
php_ifd_set16u(new_data + 0, info_data->tag, ImageInfo->motorola_intel);
@@ -3224,7 +3219,7 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
32243219

32253220
#define REQUIRE_NON_EMPTY() do { \
32263221
if (byte_count == 0) { \
3227-
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)); \
3222+
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)); \
32283223
return FALSE; \
32293224
} \
32303225
} while (0)
@@ -3258,15 +3253,15 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
32583253

32593254
if (!format || format > NUM_FORMATS) {
32603255
/* (-1) catches illegal zero case as unsigned underflows to positive large. */
3261-
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);
3256+
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);
32623257
format = TAG_FMT_BYTE;
32633258
/*return TRUE;*/
32643259
}
32653260

32663261
byte_count_signed = (int64_t)components * php_tiff_bytes_per_format[format];
32673262

32683263
if (byte_count_signed < 0 || (byte_count_signed > INT32_MAX)) {
3269-
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));
3264+
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));
32703265
return FALSE;
32713266
}
32723267

@@ -3289,11 +3284,11 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
32893284
if (value_ptr < dir_entry) {
32903285
/* we can read this if offset_val > 0 */
32913286
/* some files have their values in other parts of the file */
3292-
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);
3287+
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);
32933288
} else {
32943289
/* this is for sure not allowed */
32953290
/* exception are IFD pointers */
3296-
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);
3291+
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);
32973292
}
32983293
return FALSE;
32993294
}
@@ -3336,7 +3331,7 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
33363331
ImageInfo->sections_found |= FOUND_ANY_TAG;
33373332
#ifdef EXIF_DEBUG
33383333
dump_data = exif_dump_data(&dump_free, format, components, length, ImageInfo->motorola_intel, value_ptr);
3339-
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);
3334+
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);
33403335
if (dump_free) {
33413336
efree(dump_data);
33423337
}
@@ -3565,7 +3560,7 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
35653560
}
35663561
}
35673562
}
3568-
exif_iif_add_tag(ImageInfo, section_index, exif_get_tagname(tag, tagname, sizeof(tagname), tag_table), tag, format, components, value_ptr, byte_count);
3563+
exif_iif_add_tag(ImageInfo, section_index, exif_get_tagname_key(tag, tagname, sizeof(tagname), tag_table), tag, format, components, value_ptr, byte_count);
35693564
EFREE_IF(outside);
35703565
return TRUE;
35713566
}
@@ -4003,7 +3998,6 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
40033998
{
40043999
int i, sn, num_entries, sub_section_index = 0;
40054000
unsigned char *dir_entry;
4006-
char tagname[64];
40074001
size_t ifd_size, dir_size, entry_offset, next_offset, entry_length, entry_value=0, fgot;
40084002
int entry_tag , entry_type;
40094003
tag_table_type tag_table = exif_get_tag_table(section_index);
@@ -4041,7 +4035,7 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
40414035
entry_tag = php_ifd_get16u(dir_entry+0, ImageInfo->motorola_intel);
40424036
entry_type = php_ifd_get16u(dir_entry+2, ImageInfo->motorola_intel);
40434037
if (entry_type > NUM_FORMATS) {
4044-
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);
4038+
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);
40454039
/* Since this is repeated in exif_process_IFD_TAG make it a notice here */
40464040
/* and make it a warning in the exif_process_IFD_TAG which is called */
40474041
/* elsewhere. */
@@ -4599,7 +4593,7 @@ PHP_FUNCTION(exif_read_data)
45994593
exif_iif_add_str(&ImageInfo, SECTION_COMPUTED, "Copyright.Editor", ImageInfo.CopyrightEditor);
46004594

46014595
for (i=0; i<ImageInfo.xp_fields.count; i++) {
4602-
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);
4596+
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);
46034597
}
46044598
if (ImageInfo.Thumbnail.size) {
46054599
if (read_thumbnail) {

ext/exif/tests/bug54002.phpt

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 12 additions & 12 deletions
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

Lines changed: 1 addition & 1 deletion
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)

ext/exif/tests/bug76557.phpt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@ var_dump(exif_read_data(__DIR__ . "/bug76557.jpg"));
88
?>
99
DONE
1010
--EXPECTF--
11-
Warning: exif_read_data(bug76557.jpg): Process tag(x010F=Make ): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
11+
Warning: exif_read_data(bug76557.jpg): Process tag(x010F=Make): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
1212

13-
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
13+
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
1414

15-
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
15+
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
1616

17-
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
17+
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
1818

19-
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
19+
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
2020

21-
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
21+
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
2222

23-
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
23+
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
2424

25-
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
25+
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
2626

27-
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
27+
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
2828

29-
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
29+
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTag): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
3030

3131
Warning: exif_read_data(): Further exif parsing errors have been suppressed in %s on line %d
3232
bool(false)

ext/exif/tests/tag_with_illegal_zero_components.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var_dump(exif_read_data(__DIR__ . '/tag_with_illegal_zero_components.jpeg'));
1313

1414
?>
1515
--EXPECTF--
16-
Warning: exif_read_data(tag_with_illegal_zero_components.jpeg): Process tag(x0202=JPEGInterch): Cannot be empty in %s on line %d
16+
Warning: exif_read_data(tag_with_illegal_zero_components.jpeg): Process tag(x0202=JPEGInterchangeFormatLength): Cannot be empty in %s on line %d
1717

1818
Warning: exif_read_data(tag_with_illegal_zero_components.jpeg): File structure corrupted in %s on line %d
1919

0 commit comments

Comments
 (0)