diff options
author | is <is@pkgsrc.org> | 2011-12-30 09:33:04 +0000 |
---|---|---|
committer | is <is@pkgsrc.org> | 2011-12-30 09:33:04 +0000 |
commit | 4a39e17d36f424ff4f23561b92826253aa9a30d7 (patch) | |
tree | aa02a795a50f93bf736eca271a39281a927ab8bb /x11 | |
parent | d3d19f09ff9de21aad4a1b1f770367b1ddec2a60 (diff) | |
download | pkgsrc-4a39e17d36f424ff4f23561b92826253aa9a30d7.tar.gz |
Fix broken occurences of the CPP macro mod(a,b) using a without parentheses
in an arithmetic expression, leading to surprising results when used later
with arithmetic expressions of the same precedence as parameter a.
This is very old X11 code, copy and pasted to several places over the years.
Fixed in 1.9something (which is in mit/external). OK by wiz@.
This seems to be the root cause of CVE-2010-1166.
Diffstat (limited to 'x11')
-rw-r--r-- | x11/modular-xorg-server/Makefile | 4 | ||||
-rw-r--r-- | x11/modular-xorg-server/distinfo | 4 | ||||
-rw-r--r-- | x11/modular-xorg-server/patches/patch-sf | 13 | ||||
-rw-r--r-- | x11/modular-xorg-server/patches/patch-sg | 13 |
4 files changed, 31 insertions, 3 deletions
diff --git a/x11/modular-xorg-server/Makefile b/x11/modular-xorg-server/Makefile index 0c31bde6439..3cd24b49604 100644 --- a/x11/modular-xorg-server/Makefile +++ b/x11/modular-xorg-server/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.65 2011/11/01 06:03:04 sbd Exp $ +# $NetBSD: Makefile,v 1.66 2011/12/30 09:33:04 is Exp $ # DISTNAME= xorg-server-1.6.5 PKGNAME= modular-${DISTNAME} -PKGREVISION= 10 +PKGREVISION= 11 CATEGORIES= x11 MASTER_SITES= ${MASTER_SITE_XORG:=xserver/} EXTRACT_SUFX= .tar.bz2 diff --git a/x11/modular-xorg-server/distinfo b/x11/modular-xorg-server/distinfo index 9bf3b692603..3a54814fd3e 100644 --- a/x11/modular-xorg-server/distinfo +++ b/x11/modular-xorg-server/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.43 2010/10/31 23:43:08 wiz Exp $ +$NetBSD: distinfo,v 1.44 2011/12/30 09:33:04 is Exp $ SHA1 (xorg-server-1.6.5.tar.bz2) = c57c80dd15d3ca492e58ae993b9015d085ec6ea6 RMD160 (xorg-server-1.6.5.tar.bz2) = 702970358a5643dbc9205f42e39c5b8ed2ff845a @@ -30,3 +30,5 @@ SHA1 (patch-sb) = 48c22a62b30c6bc4d5786624bc264fee30a9bb81 SHA1 (patch-sc) = dd93e15253b78395050d65df0f972e57ccf546e0 SHA1 (patch-sd) = 36d3946217b57416e8d0d3099e48d4e9f957c881 SHA1 (patch-se) = 22b20c734b7fcf59d75227aeb1fa703465582568 +SHA1 (patch-sf) = 22d4f575c066691696ec96f1fcd459251b662012 +SHA1 (patch-sg) = 81598e687357a6e8b477055d14ece01372ae4617 diff --git a/x11/modular-xorg-server/patches/patch-sf b/x11/modular-xorg-server/patches/patch-sf new file mode 100644 index 00000000000..4a8b2220862 --- /dev/null +++ b/x11/modular-xorg-server/patches/patch-sf @@ -0,0 +1,13 @@ +$NetBSD: patch-sf,v 1.1 2011/12/30 09:33:04 is Exp $ + +--- fb/fbpict.c.orig 2009-10-12 02:52:40.000000000 +0000 ++++ fb/fbpict.c +@@ -37,7 +37,7 @@ + #include "mipict.h" + #include "fbpict.h" + +-#define mod(a,b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b)) ++#define mod(a,b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-(a)) % (b)) + + void + fbWalkCompositeRegion (CARD8 op, diff --git a/x11/modular-xorg-server/patches/patch-sg b/x11/modular-xorg-server/patches/patch-sg new file mode 100644 index 00000000000..e3af24dda2b --- /dev/null +++ b/x11/modular-xorg-server/patches/patch-sg @@ -0,0 +1,13 @@ +$NetBSD: patch-sg,v 1.1 2011/12/30 09:33:04 is Exp $ + +--- mi/miarc.c.orig 2009-10-12 02:52:40.000000000 +0000 ++++ mi/miarc.c +@@ -1525,7 +1525,7 @@ miRoundCap( + + # define Dsin(d) ((d) == 0.0 ? 0.0 : ((d) == 90.0 ? 1.0 : sin(d*M_PI/180.0))) + # define Dcos(d) ((d) == 0.0 ? 1.0 : ((d) == 90.0 ? 0.0 : cos(d*M_PI/180.0))) +-# define mod(a,b) ((a) >= 0 ? (a) % (b) : (b) - (-a) % (b)) ++# define mod(a,b) ((a) >= 0 ? (a) % (b) : (b) - (-(a)) % (b)) + + static double + miDcos (double a) |