summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-06-03 15:34:37 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-06-03 15:35:43 +0100
commit6dacaddb6a28670a52cead4b62c056a8acde8f3a (patch)
tree5533d49b217d04a411240a47df8ba3514beadc1a /src
parent8a88c01c3737a3570628600b1ab51938f82e226d (diff)
sna: Always populate the CPU features string
So that we don't print random contents of the stack on ancient 32-bit CPUs with no extended instruction sets. References: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1186800 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_cpu.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sna/sna_cpu.c b/src/sna/sna_cpu.c
index 489bf6c8..c96b21f0 100644
--- a/src/sna/sna_cpu.c
+++ b/src/sna/sna_cpu.c
@@ -108,7 +108,9 @@ char *sna_cpu_features_to_string(unsigned features, char *line)
char *ret = line;
#ifdef __x86_64__
- line += sprintf (line, ", x86-64");
+ line += sprintf (line, "x86-64");
+#else
+ line += sprintf (line, "x86");
#endif
if (features & SSE2)
@@ -126,5 +128,5 @@ char *sna_cpu_features_to_string(unsigned features, char *line)
if (features & AVX2)
line += sprintf (line, ", avx2");
- return ret + 2;
+ return ret;
}