summaryrefslogtreecommitdiff
path: root/x11/modular-xorg-server
diff options
context:
space:
mode:
authoris <is>2011-12-30 09:33:04 +0000
committeris <is>2011-12-30 09:33:04 +0000
commit6a09f5814939d03600673b1e6dacd41e50167a4f (patch)
treeaa02a795a50f93bf736eca271a39281a927ab8bb /x11/modular-xorg-server
parent93e893850c77a7052e58c37eb0d4796e13730b14 (diff)
downloadpkgsrc-6a09f5814939d03600673b1e6dacd41e50167a4f.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/modular-xorg-server')
-rw-r--r--x11/modular-xorg-server/Makefile4
-rw-r--r--x11/modular-xorg-server/distinfo4
-rw-r--r--x11/modular-xorg-server/patches/patch-sf13
-rw-r--r--x11/modular-xorg-server/patches/patch-sg13
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)