[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xorg-server: Changes to 'debian-unstable'



 debian/patches/11_dont_crash_on_bad_dri_mode.diff |   66 ++++++++++++++++++++++
 hw/xfree86/parser/scan.c                          |    9 ---
 2 files changed, 66 insertions(+), 9 deletions(-)

New commits:
commit 639738e781c8974c02f8d4f72f372af9e8e2889c
Author: David Nusinow <dnusinow@debian.org>
Date:   Sun Mar 2 18:35:27 2008 -0500

    * Add 11_dont_crash_on_bad_dri_mode. See bugzilla #13860

diff --git a/debian/changelog b/debian/changelog
index 5af71a3..0ed3d77 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,7 +20,10 @@ xorg-server (2:1.4.1~git20080131-2) UNRELEASED; urgency=low
     (once again closes: #433131)
   * Refresh all patches to make patch-audit happy.
 
- -- Drew Parsons <dparsons@debian.org>  Mon, 25 Feb 2008 03:25:53 +1100
+  [ David Nusinow ]
+  * Add 11_dont_crash_on_bad_dri_mode. See bugzilla #13860
+
+ -- David Nusinow <dnusinow@debian.org>  Sun, 02 Mar 2008 10:02:40 -0500
 
 xorg-server (2:1.4.1~git20080131-1) unstable; urgency=low
 
diff --git a/debian/patches/11_dont_crash_on_bad_dri_mode.diff b/debian/patches/11_dont_crash_on_bad_dri_mode.diff
new file mode 100644
index 0000000..f17afb3
--- /dev/null
+++ b/debian/patches/11_dont_crash_on_bad_dri_mode.diff
@@ -0,0 +1,66 @@
+Index: xorg-server/hw/xfree86/parser/Configint.h
+===================================================================
+--- xorg-server.orig/hw/xfree86/parser/Configint.h	2008-03-02 17:09:50.000000000 -0500
++++ xorg-server/hw/xfree86/parser/Configint.h	2008-03-02 18:33:14.000000000 -0500
+@@ -71,11 +71,14 @@
+ #include <stddef.h>
+ #include "xf86Parser.h"
+ 
++typedef enum { PARSE_DECIMAL, PARSE_OCTAL, PARSE_HEX } ParserNumType;
++
+ typedef struct
+ {
+ 	int num;		/* returned number */
+ 	char *str;		/* private copy of the return-string */
+ 	double realnum;		/* returned number as a real */
++        ParserNumType numType;  /* used to enforce correct number formatting */
+ }
+ LexRec, *LexPtr;
+ 
+@@ -215,6 +218,8 @@
+ "\ta numerical group id."
+ #define MULTIPLE_MSG \
+ "Multiple \"%s\" lines."
++#define MUST_BE_OCTAL_MSG \
++"The number \"%d\" given in this section must be in octal (0xxx) format."
+ 
+ /* Warning messages */
+ #define OBSOLETE_MSG \
+Index: xorg-server/hw/xfree86/parser/DRI.c
+===================================================================
+--- xorg-server.orig/hw/xfree86/parser/DRI.c	2008-03-02 17:09:50.000000000 -0500
++++ xorg-server/hw/xfree86/parser/DRI.c	2008-03-02 18:33:14.000000000 -0500
+@@ -117,6 +117,8 @@
+ 	    case MODE:
+ 		if (xf86getSubToken (&(ptr->dri_comment)) != NUMBER)
+ 		    Error (NUMBER_MSG, "Mode");
++                if (val.numType != PARSE_OCTAL)
++                    Error (MUST_BE_OCTAL_MSG, val.num);
+ 		ptr->dri_mode = val.num;
+ 		break;
+ 	    case BUFFERS:
+Index: xorg-server/hw/xfree86/parser/scan.c
+===================================================================
+--- xorg-server.orig/hw/xfree86/parser/scan.c	2008-03-02 18:33:23.000000000 -0500
++++ xorg-server/hw/xfree86/parser/scan.c	2008-03-02 18:33:29.000000000 -0500
+@@ -379,11 +379,20 @@
+ 			if (c == '0')
+ 				if ((configBuf[configPos] == 'x') ||
+ 					(configBuf[configPos] == 'X'))
++                                {
+ 					base = 16;
++                                        val.numType = PARSE_HEX; 
++                                }
+ 				else
++                                {
+ 					base = 8;
++                                        val.numType = PARSE_OCTAL;
++                                }
+ 			else
++                        {
+ 				base = 10;
++                                val.numType = PARSE_DECIMAL;
++                        }
+ 
+ 			configRBuf[0] = c;
+ 			i = 1;
diff --git a/debian/patches/series b/debian/patches/series
index a90ab4a..085689a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,6 +7,7 @@
 07_autoconfig_screen_with_device_section.diff
 08_better_dpms_logging.diff
 10_dont_look_in_home_for_config.diff -p0
+11_dont_crash_on_bad_dri_mode.diff
 13_debian_add_xkbpath_env_variable.diff
 14_default_screen_section.diff
 21_glx_align_fixes.patch

commit acc020b9608d11840638c358ee0154497bce7a3e
Author: David Nusinow <dnusinow@debian.org>
Date:   Sun Mar 2 18:30:13 2008 -0500

    I screwed up this commit. Fixing.
    
    Revert "* Add 11_dont_crash_on_bad_dri_mode. See bugzilla #13860"
    
    This reverts commit 949fae79e1b4fce2dc3f756650f68f519157d776.

diff --git a/debian/changelog b/debian/changelog
index 0ed3d77..5af71a3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,10 +20,7 @@ xorg-server (2:1.4.1~git20080131-2) UNRELEASED; urgency=low
     (once again closes: #433131)
   * Refresh all patches to make patch-audit happy.
 
-  [ David Nusinow ]
-  * Add 11_dont_crash_on_bad_dri_mode. See bugzilla #13860
-
- -- David Nusinow <dnusinow@debian.org>  Sun, 02 Mar 2008 10:02:40 -0500
+ -- Drew Parsons <dparsons@debian.org>  Mon, 25 Feb 2008 03:25:53 +1100
 
 xorg-server (2:1.4.1~git20080131-1) unstable; urgency=low
 
diff --git a/debian/patches/series b/debian/patches/series
index 085689a..a90ab4a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,7 +7,6 @@
 07_autoconfig_screen_with_device_section.diff
 08_better_dpms_logging.diff
 10_dont_look_in_home_for_config.diff -p0
-11_dont_crash_on_bad_dri_mode.diff
 13_debian_add_xkbpath_env_variable.diff
 14_default_screen_section.diff
 21_glx_align_fixes.patch
diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index 3e66685..55c7eb5 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -379,20 +379,11 @@ again:
 			if (c == '0')
 				if ((configBuf[configPos] == 'x') ||
 					(configBuf[configPos] == 'X'))
-                                {
 					base = 16;
-                                        val.numType = PARSE_HEX; 
-                                }
 				else
-                                {
 					base = 8;
-                                        val.numType = PARSE_OCTAL;
-                                }
 			else
-                        {
 				base = 10;
-                                val.numType = PARSE_DECIMAL;
-                        }
 
 			configRBuf[0] = c;
 			i = 1;


Reply to: