Go to file
Pavel Grunt cb4ec1fc80 monitor-alignment: Do not crash on NULL display
Since commit 01b66ef88b virt-viewer
does not crash on connection to a guest using an invalid display
configuration (eg. Cirrus & QXL vga). That commit allowed existence
of NULL display, however the code handling monitors alignment does
not expect this and crashes when virt-viewer is shifting/aligning
its windows.

Avoid crashing by returning early on NULL display.

 #0  0x0000000000411d0a in displays_cmp (p1=p1@entry=0xbad940, p2=p2@entry=0xbad944, user_data=user_data@entry=0x8eb180) at virt-viewer-util.c:544
 #1  0x00007ffff3f16ac5 in msort_with_tmp (p=0x7fffffffd670, b=0xbad940, n=2) at gqsort.c:93
 #2  0x00007ffff3f16ded in msort_r (b=b@entry=0xbad940, n=n@entry=2, s=s@entry=4, cmp=cmp@entry=0x411ce0 <displays_cmp>, arg=arg@entry=0x8eb180) at gqsort.c:278
 #3  0x00007ffff3f16e78 in g_qsort_with_data (pbase=pbase@entry=0xbad940, total_elems=total_elems@entry=2, size=size@entry=4, compare_func=compare_func@entry=0x411ce0 <displays_cmp>, user_data=user_data@entry=0x8eb180) at gqsort.c:303
 #4  0x000000000041277c in virt_viewer_align_monitors_linear (displays=displays@entry=0x8eb180 = {...}) at virt-viewer-util.c:586
 #5  0x000000000041a92d in virt_viewer_session_on_monitor_geometry_changed (self=0x8f38a0 [VirtViewerSessionSpice], display=<optimized out>) at virt-viewer-session.c:373
 #6  0x00007ffff4415908 in g_closure_invoke (closure=0x9306c0, return_value=return_value@entry=0x0, n_param_values=2, param_values=param_values@entry=0x7fffffffd960, invocation_hint=invocation_hint@entry=0x7fffffffd900)  at gclosure.c:801
 #7  0x00007ffff4427a1d in signal_emit_unlocked_R (node=node@entry=0x668f80, detail=detail@entry=1551, instance=instance@entry=0x930440, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffd960) at gsignal.c:3627
 #8  0x00007ffff442fab1 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffdaf0) at gsignal.c:3383
 #9  0x00007ffff442fd9f in <emit signal notify:agent-connected on instance 0x930440 [SpiceMainChannel]> (instance=instance@entry=0x930440, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3439
 #10 0x00007ffff4419fd4 in g_object_dispatch_properties_changed (object=0x930440 [SpiceMainChannel], n_pspecs=<optimized out>, pspecs=<optimized out> at gobject.c:1061
 #11 0x00007ffff441c4f9 in g_object_notify (pspec=<optimized out>, object=0x930440 [SpiceMainChannel]) at gobject.c:1155
 #12 0x00007ffff441c4f9 in g_object_notify (object=0x930440 [SpiceMainChannel], property_name=<optimized out>) at gobject.c:1202
 #13 0x00007ffff5a63dd0 in notify_main_context (opaque=0x7fffd6fde990) at gio-coroutine.c:240
 #14 0x00007ffff3f07d7a in g_main_context_dispatch (context=0x68da40) at gmain.c:3152
 #15 0x00007ffff3f07d7a in g_main_context_dispatch (context=context@entry=0x68da40) at gmain.c:3767
 #16 0x00007ffff3f080b8 in g_main_context_iterate (context=0x68da40, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3838
 #17 0x00007ffff3f0838a in g_main_loop_run (loop=0x710de0) at gmain.c:4032
 #18 0x00007ffff5f53045 in gtk_main () at gtkmain.c:1207
 #19 0x0000000000411a22 in main (argc=1, argv=0x7fffffffdfa8)

Resolves: rhbz#1250820

Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2016-06-20 17:08:28 +02:00
build-aux Import GNULIB rules for syntax checking code 2012-02-06 12:42:23 +00:00
data msi: Depend on mingw-adwaita-icon-theme 2016-05-03 08:04:23 +02:00
docs docs: fix "make syntaxcheck" 2015-12-01 16:46:07 +01:00
icons Add virt-viewer-usb.png 2014-11-24 14:14:14 +01:00
man ovirt: Use sso-token when set in .vv file 2016-05-10 09:51:14 +02:00
po Add file transfer dialog 2016-05-03 08:04:10 +02:00
src monitor-alignment: Do not crash on NULL display 2016-06-20 17:08:28 +02:00
tests monitor-alignment: Do not crash on NULL display 2016-06-20 17:08:28 +02:00
.mailmap update .mailmap 2012-03-01 16:20:25 +01:00
acinclude.m4 m4: Use -Wdeprecated-declarations 2016-02-24 16:56:51 +01:00
AUTHORS.in Auto-generate AUTHORS file from GIT logs 2013-02-13 15:17:57 +00:00
autobuild.sh Drop support to gtk2 2016-02-15 21:49:57 +01:00
autogen.sh autogen: Ensure m4 directory exists 2015-11-05 14:24:23 +00:00
cfg.mk Delete browser plugin entirely 2013-03-13 11:47:42 +00:00
ChangeLog Automatically generate changelog from GIT history during make dist 2011-11-07 12:42:15 +00:00
configure.ac msi: Depend on mingw-adwaita-icon-theme 2016-05-03 08:04:23 +02:00
COPYING Added COPYING/INSTALL files 2007-08-15 20:22:40 -04:00
git.mk git.mk: fix copyright line and remove use of -o / -a 2015-11-05 14:22:35 +00:00
GNUmakefile Import GNULIB rules for syntax checking code 2012-02-06 12:42:23 +00:00
intltool-extract.in Add support for i18n of the UI 2010-01-11 16:01:20 +00:00
intltool-merge.in Add support for i18n of the UI 2010-01-11 16:01:20 +00:00
intltool-update.in Add support for i18n of the UI 2010-01-11 16:01:20 +00:00
maint.mk Adapt 'po file' syntax check to look at more files 2013-02-13 15:18:19 +00:00
Makefile.am Remove nsis installer 2016-05-03 08:04:23 +02:00
mingw-virt-viewer.spec.in msi: Depend on mingw-adwaita-icon-theme 2016-05-03 08:04:23 +02:00
NEWS Update NEWS for release 3.0 2015-12-03 13:41:56 +00:00
README README: update information 2016-02-25 09:26:57 +01:00
virt-viewer.spec.in spec: Use pkgconfig() in BuildRequires 2016-04-15 18:03:31 +02:00

  Virt Viewer
  ===========

Virt Viewer provides a graphical viewer for the guest OS
display. At this time is supports guest OS using the VNC
or SPICE protocols. Further protocols may be supported in
the future as user demand dictates. The viewer can connect
directly to both local and remotely hosted guest OS, optionally
using SSL/TLS encryption.

Virt Viewer is the GTK3 application. Virt Viewer 3.0 was
the last release that supported GTK2.

Virt Viewer uses the GTK-VNC (>= 0.4.0) widget to provide a
display of the VNC protocol, which is available from

  http://gtk-vnc.sourceforge.net/

Virt Viewer uses the SPICE-GTK (>= 0.30) widget to provide a
display of the SPICE protocol, which is available from:

  http://www.spice-space.org/download.html

Use of either SPICE-GTK or GTK-VNC can be disabled at time
of configure, with --without-gtk-vnc or --without-spice-gtk
respectively.

Virt Viewer uses libvirt to lookup information about the
guest OS display. This is available from

  http://libvirt.org/

Further information about the Virt Viewer application can be
found on the Virt Manager website:

  http://virt-manager.org/

Feedback should be directed to the mailing list at

  http://virt-manager.org/mailinglist.html

-- End