1 |
remi 13/11/04 21:18:00 |
2 |
|
3 |
Added: xf86-video-intel-2.99.905-fix-randr.patch |
4 |
Log: |
5 |
x11-drivers/xf86-video-intel: Add patch to fix RandR segfault, see bug #490414 |
6 |
|
7 |
(Portage version: 2.2.7/cvs/Linux x86_64, unsigned Manifest commit) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 x11-drivers/xf86-video-intel/files/xf86-video-intel-2.99.905-fix-randr.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/xf86-video-intel/files/xf86-video-intel-2.99.905-fix-randr.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/xf86-video-intel/files/xf86-video-intel-2.99.905-fix-randr.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: xf86-video-intel-2.99.905-fix-randr.patch |
16 |
=================================================================== |
17 |
From 8e44b1f5543f6d36c33c743f1ba2143514f8afbf Mon Sep 17 00:00:00 2001 |
18 |
From: Chris Wilson <chris@×××××××××××××××.uk> |
19 |
Date: Thu, 24 Oct 2013 13:05:16 +0100 |
20 |
Subject: [PATCH] sna: Fix canonical mode name to correctly use asprintf |
21 |
|
22 |
Whoops. Only the kernel sprintf() accepts NULL as a valid target string, |
23 |
not libc's. |
24 |
|
25 |
Reported-by: Jay Little <jaylittle@×××××××××.com> |
26 |
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70835 |
27 |
Signed-off-by: Chris Wilson <chris@×××××××××××××××.uk> |
28 |
--- |
29 |
src/sna/sna_display.c | 23 ++++++----------------- |
30 |
1 file changed, 6 insertions(+), 17 deletions(-) |
31 |
|
32 |
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c |
33 |
index 7fcade6..3c39305 100644 |
34 |
--- a/src/sna/sna_display.c |
35 |
+++ b/src/sna/sna_display.c |
36 |
@@ -2095,27 +2095,16 @@ sna_output_panel_edid(xf86OutputPtr output, DisplayModePtr modes) |
37 |
return xf86ModesAdd(modes, m); |
38 |
} |
39 |
|
40 |
-static int _canonical_mode_name(DisplayModePtr mode, char *str) |
41 |
-{ |
42 |
- return sprintf(str, "%dx%d%s", |
43 |
- mode->HDisplay, mode->VDisplay, |
44 |
- mode->Flags & V_INTERLACE ? "i" : ""); |
45 |
-} |
46 |
- |
47 |
static char *canonical_mode_name(DisplayModePtr mode) |
48 |
{ |
49 |
- char *str; |
50 |
- int len; |
51 |
- |
52 |
- len = _canonical_mode_name(mode, NULL); |
53 |
- if (len < 0) |
54 |
- return NULL; |
55 |
+ char *str; |
56 |
|
57 |
- str = malloc(len + 1); |
58 |
- if (str != NULL) |
59 |
- _canonical_mode_name(mode, str); |
60 |
+ if (asprintf(&str, "%dx%d%s", |
61 |
+ mode->HDisplay, mode->VDisplay, |
62 |
+ mode->Flags & V_INTERLACE ? "i" : "") < 0) |
63 |
+ return NULL; |
64 |
|
65 |
- return str; |
66 |
+ return str; |
67 |
} |
68 |
|
69 |
static DisplayModePtr |
70 |
-- |
71 |
1.8.4.2 |