ee295f46b9
- security update * CVE-2018-17100 [bsc#1108637] + tiff-CVE-2018-17100.patch * CVE-2018-17101 [bsc#1108627] + tiff-CVE-2018-17101.patch OBS-URL: https://build.opensuse.org/request/show/642627 OBS-URL: https://build.opensuse.org/package/show/graphics/tiff?expand=0&rev=125
59 lines
1.7 KiB
Diff
59 lines
1.7 KiB
Diff
diff --git a/tools/pal2rgb.c b/tools/pal2rgb.c
|
|
index 01fcf941..01d8502e 100644
|
|
--- a/tools/pal2rgb.c
|
|
+++ b/tools/pal2rgb.c
|
|
@@ -402,7 +402,23 @@ cpTags(TIFF* in, TIFF* out)
|
|
{
|
|
struct cpTag *p;
|
|
for (p = tags; p < &tags[NTAGS]; p++)
|
|
- cpTag(in, out, p->tag, p->count, p->type);
|
|
+ {
|
|
+ if( p->tag == TIFFTAG_GROUP3OPTIONS )
|
|
+ {
|
|
+ uint16 compression;
|
|
+ if( !TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) ||
|
|
+ compression != COMPRESSION_CCITTFAX3 )
|
|
+ continue;
|
|
+ }
|
|
+ if( p->tag == TIFFTAG_GROUP4OPTIONS )
|
|
+ {
|
|
+ uint16 compression;
|
|
+ if( !TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) ||
|
|
+ compression != COMPRESSION_CCITTFAX4 )
|
|
+ continue;
|
|
+ }
|
|
+ cpTag(in, out, p->tag, p->count, p->type);
|
|
+ }
|
|
}
|
|
#undef NTAGS
|
|
|
|
diff --git a/tools/tiff2bw.c b/tools/tiff2bw.c
|
|
index 05faba87..5bef3142 100644
|
|
--- a/tools/tiff2bw.c
|
|
+++ b/tools/tiff2bw.c
|
|
@@ -450,7 +450,23 @@ cpTags(TIFF* in, TIFF* out)
|
|
{
|
|
struct cpTag *p;
|
|
for (p = tags; p < &tags[NTAGS]; p++)
|
|
- cpTag(in, out, p->tag, p->count, p->type);
|
|
+ {
|
|
+ if( p->tag == TIFFTAG_GROUP3OPTIONS )
|
|
+ {
|
|
+ uint16 compression;
|
|
+ if( !TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) ||
|
|
+ compression != COMPRESSION_CCITTFAX3 )
|
|
+ continue;
|
|
+ }
|
|
+ if( p->tag == TIFFTAG_GROUP4OPTIONS )
|
|
+ {
|
|
+ uint16 compression;
|
|
+ if( !TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) ||
|
|
+ compression != COMPRESSION_CCITTFAX4 )
|
|
+ continue;
|
|
+ }
|
|
+ cpTag(in, out, p->tag, p->count, p->type);
|
|
+ }
|
|
}
|
|
#undef NTAGS
|
|
|