From dc627718d77b0e853311e480bba90eddefd0b891 Mon Sep 17 00:00:00 2001 From: Bryce Harrington Date: Wed, 2 Sep 2009 01:46:50 -0700 Subject: [PATCH] Check output pointer validity for --sale and --transform Signed-off-by: Bryce Harrington --- xrandr.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/xrandr.c b/xrandr.c index 413ea7b..1bff542 100644 --- a/xrandr.c +++ b/xrandr.c @@ -2329,6 +2329,7 @@ main (int argc, char **argv) { double sx, sy; if (++i>=argc) usage(); + if (!output) usage(); if (sscanf (argv[i], "%lfx%lf", &sx, &sy) != 2) usage (); init_transform (&output->transform); @@ -2348,6 +2349,7 @@ main (int argc, char **argv) double transform[3][3]; int k, l; if (++i>=argc) usage (); + if (!output) usage(); init_transform (&output->transform); if (strcmp (argv[i], "none") != 0) { -- 1.6.3.3