Re: [vdagent-linux 1/3] Handle get_current_mon_config() failures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Tue, Sep 23, 2014 at 5:32 PM, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote:
get_current_mon_config() can return NULL, but
vdagent_x11_set_monitor_config() was calling it without checking if it's
NULL before dereferencing it.
This issue was pinpointed by Coverity.
---
 src/vdagent-x11-randr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/vdagent-x11-randr.c b/src/vdagent-x11-randr.c
index 46367bc..f48f045 100644
--- a/src/vdagent-x11-randr.c
+++ b/src/vdagent-x11-randr.c
@@ -735,6 +735,8 @@ void vdagent_x11_set_monitor_config(struct vdagent_x11 *x11,
     }

     curr = get_current_mon_config(x11);
+    if (!curr)
+        goto exit;
     if (same_monitor_configs(mon_config, curr) &&
            x11->width[0] == primary_w && x11->height[0] == primary_h) {
         goto exit;
--
1.9.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

ACK the series!

--
Fabiano Fidêncio
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]