<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 23, 2014 at 5:32 PM, Christophe Fergeau <span dir="ltr"><<a href="mailto:cfergeau@redhat.com" target="_blank">cfergeau@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">get_current_mon_config() can return NULL, but<br>
vdagent_x11_set_monitor_config() was calling it without checking if it's<br>
NULL before dereferencing it.<br>
This issue was pinpointed by Coverity.<br>
---<br>
src/vdagent-x11-randr.c | 2 ++<br>
1 file changed, 2 insertions(+)<br>
<br>
diff --git a/src/vdagent-x11-randr.c b/src/vdagent-x11-randr.c<br>
index 46367bc..f48f045 100644<br>
--- a/src/vdagent-x11-randr.c<br>
+++ b/src/vdagent-x11-randr.c<br>
@@ -735,6 +735,8 @@ void vdagent_x11_set_monitor_config(struct vdagent_x11 *x11,<br>
}<br>
<br>
curr = get_current_mon_config(x11);<br>
+ if (!curr)<br>
+ goto exit;<br>
if (same_monitor_configs(mon_config, curr) &&<br>
x11->width[0] == primary_w && x11->height[0] == primary_h) {<br>
goto exit;<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.9.3<br>
<br>
_______________________________________________<br>
Spice-devel mailing list<br>
<a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
</font></span></blockquote></div><br>ACK the series!<br clear="all"><div><br></div>-- <br><div>Fabiano Fidêncio</div>
</div></div>