[gnome-flashback] display-config: fix the max potential number of logical monitors
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] display-config: fix the max potential number of logical monitors
- Date: Sun, 29 Nov 2015 19:48:04 +0000 (UTC)
commit 3122e54f9a42d927611e7d0c4fc353334e5583e5
Author: Rui Matos <tiagomatos gmail com>
Date: Fri Jul 3 18:01:14 2015 +0200
display-config: fix the max potential number of logical monitors
The max potential number of logical monitors (i.e. MetaMonitorInfos)
is the number of CRTCs, not the number of outputs.
In cases where we have more enabled CRTCs than connected outputs we
would end up appending more MetaMonitorInfos to the GArray than the
size it was initialized with which means the array would get
re-allocated rendering invalid some MetaCRTC->logical_monitor pointers
assigned previously and thus ending in crashes later on.
https://bugzilla.gnome.org/show_bug.cgi?id=751638
.../libdisplay-config/flashback-monitor-manager.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gnome-flashback/libdisplay-config/flashback-monitor-manager.c
b/gnome-flashback/libdisplay-config/flashback-monitor-manager.c
index 29f80ef..7820672 100644
--- a/gnome-flashback/libdisplay-config/flashback-monitor-manager.c
+++ b/gnome-flashback/libdisplay-config/flashback-monitor-manager.c
@@ -910,7 +910,7 @@ make_logical_config (FlashbackMonitorManager *manager)
unsigned int i, j;
monitor_infos = g_array_sized_new (FALSE, TRUE, sizeof (MetaMonitorInfo),
- manager->n_outputs);
+ manager->n_crtcs);
/* Walk the list of MetaCRTCs, and build a MetaMonitorInfo
for each of them, unless they reference a rectangle that
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]