1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-28 10:08:24 +00:00
freebsd-ports/graphics/tiff/files/patch-tif_fax3.c
Dirk Meyer f025b838e6 - add Security patches
- fix missign macro in manpages
- add regression test
Security: CVE-2006-2193
Security: CVE-2006-2327
Security: CVE-2006-2656
Security: CVE-2006-3459
Security: CVE-2006-3460
Security: CVE-2006-3461
Security: CVE-2006-3462
Security: CVE-2006-3463
Security: CVE-2006-3464
Security: CVE-2006-3465
Security: CVE-2008-2327
PR:		127434
Submitted by:	<bf2006a@yahoo.com>
Obtained From:	Gentoo,Debian
Approved by:	portmgr (marcus)
2008-09-20 07:33:20 +00:00

28 lines
724 B
C

CVE-2006-3464,3465
===================================================================
--- libtiff/tif_fax3.c.orig 2008-08-17 13:03:48.970994629 -0400
+++ libtiff/tif_fax3.c 2008-08-17 13:03:52.890034927 -0400
@@ -1136,6 +1136,7 @@
Fax3VSetField(TIFF* tif, ttag_t tag, va_list ap)
{
Fax3BaseState* sp = Fax3State(tif);
+ const TIFFFieldInfo* fip;
assert(sp != 0);
assert(sp->vsetparent != 0);
@@ -1181,7 +1182,13 @@
default:
return (*sp->vsetparent)(tif, tag, ap);
}
- TIFFSetFieldBit(tif, _TIFFFieldWithTag(tif, tag)->field_bit);
+
+ if ((fip = _TIFFFieldWithTag(tif, tag))) {
+ TIFFSetFieldBit(tif, fip->field_bit);
+ } else {
+ return (0);
+ }
+
tif->tif_flags |= TIFF_DIRTYDIRECT;
return (1);
}