31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
From dc627718d77b0e853311e480bba90eddefd0b891 Mon Sep 17 00:00:00 2001
|
|
From: Bryce Harrington <bryce@bryceharrington.org>
|
|
Date: Wed, 2 Sep 2009 01:46:50 -0700
|
|
Subject: [PATCH] Check output pointer validity for --sale and --transform
|
|
|
|
Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
|
|
---
|
|
xrandr.c | 2 ++
|
|
1 files changed, 2 insertions(+), 0 deletions(-)
|
|
|
|
Index: x11-xserver-utils-7.4+2ubuntu2/xrandr/xrandr.c
|
|
===================================================================
|
|
--- x11-xserver-utils-7.4+2ubuntu2.orig/xrandr/xrandr.c 2009-09-17 15:45:26.000000000 -0400
|
|
+++ x11-xserver-utils-7.4+2ubuntu2/xrandr/xrandr.c 2009-09-17 15:45:46.000000000 -0400
|
|
@@ -2327,6 +2327,7 @@
|
|
{
|
|
double sx, sy;
|
|
if (++i>=argc) usage();
|
|
+ if (!output) usage();
|
|
if (sscanf (argv[i], "%lfx%lf", &sx, &sy) != 2)
|
|
usage ();
|
|
init_transform (&output->transform);
|
|
@@ -2346,6 +2347,7 @@
|
|
double transform[3][3];
|
|
int k, l;
|
|
if (++i>=argc) usage ();
|
|
+ if (!output) usage();
|
|
init_transform (&output->transform);
|
|
if (strcmp (argv[i], "none") != 0)
|
|
{
|