Package: vice
Version: 1.20-2
Severity: grave
Justification: renders package unusable
Tags: upstream patch

Display in vice was broken by the latest security update for libx11.
Since libx11 1.0.3-7, all it displays in the emulated screen is a
black picture.

After some investigation (triggered by noticing "XCreateImage failed"
messages in the console output), it appears that this is due to a
call to XCreateImage() with image_bytes_per_line set to 1, which
fails with the new input sanitization performed by said libx11
function.

I tested the current debian package (1.20-2) and it is affected by
this bug. I propose the attached simple patch that seems to work for
me (so far) for version 1.20. Please note however that I have
compiled my own vice since version 1.17.

Best regards,
Pier Luigi Pau


-- System Information:
Debian Release: 4.0
 APT prefers testing
 APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16.46
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)

Versions of packages vice depends on:
ii  libart-2.0-2              2.3.17-1       Library of functions for 2D graphi
ii  libasound2                1.0.13-2       ALSA library
ii  libatk1.0-0               1.12.4-3       The ATK accessibility toolkit
ii  libbonobo2-0              2.14.0-3       Bonobo CORBA interfaces library
ii  libbonoboui2-0            2.14.0-5       The Bonobo UI library
ii  libc6                     2.3.6.ds1-13   GNU C Library: Shared libraries
ii  libcairo2                 1.2.4-4        The Cairo 2D vector graphics libra
ii  libesd-alsa0 [libesd0]    0.2.36-3       Enlightened Sound Daemon (ALSA) -
ii  libfontconfig1            2.4.2-1.2      generic font configuration library
ii  libgcc1                   1:4.1.1-21     GCC support library
ii  libgconf2-4               2.16.1-1       GNOME configuration database syste
ii  libglib2.0-0              2.12.4-2       The GLib library of C routines
ii  libgnome-keyring0         0.6.0-3        GNOME keyring services library
ii  libgnome2-0               2.16.0-2       The GNOME 2 library - runtime file
ii  libgnomecanvas2-0         2.14.0-2       A powerful object-oriented display
ii  libgnomeui-0              2.14.1-2       The GNOME 2 libraries (User Interf
ii  libgnomevfs2-0            1:2.14.2-7     GNOME virtual file-system (runtime
ii  libgtk2.0-0               2.8.20-7       The GTK+ graphical user interface
ii  libice6                   1:1.0.1-2      X11 Inter-Client Exchange library
ii  libieee1284-3             0.2.10-4       cross-platform library for paralle
ii  libjpeg62                 6b-13          The Independent JPEG Group's JPEG
ii  liborbit2                 1:2.14.3-0.1   libraries for ORBit2 - a CORBA ORB
ii  libpango1.0-0             1.14.8-5       Layout and rendering of internatio
ii  libpng12-0                1.2.15~beta5-1 PNG library - runtime
ii  libpopt0                  1.10-3         lib for parsing cmdline parameters
ii  libreadline5              5.2-2          GNU readline and history libraries
ii  libsm6                    1:1.0.1-3      X11 Session Management library
ii  libstdc++6                4.1.1-21       The GNU Standard C++ Library v3
ii  libx11-6                  2:1.0.3-7      X11 client-side library
ii  libxcursor1               1.1.7-4        X cursor management library
ii  libxext6                  1:1.0.1-2      X11 miscellaneous extension librar
ii  libxfixes3                1:4.0.1-5      X11 miscellaneous 'fixes' extensio
ii  libxi6                    1:1.0.1-4      X11 Input extension library
ii  libxinerama1              1:1.0.1-4.1    X11 Xinerama extension library
ii  libxml2                   2.6.27.dfsg-1  GNOME XML library
ii  libxrandr2                2:1.1.0.2-5    X11 RandR extension library
ii  libxrender1               1:0.9.1-3      X Rendering Extension client libra
ii  libxv1                    1:1.0.2-1      X11 Video extension library
ii  libxxf86dga1              2:1.0.1-2      X11 Direct Graphics Access extensi
ii  libxxf86vm1               1:1.0.1-2      X11 XFree86 video mode extension l
ii  zlib1g                    1:1.2.3-13     compression library - runtime

vice recommends no packages.

-- no debconf information
--- vice-1.20/src/arch/unix/x11/xaw/uicolor.c  2003-06-24 15:17:32.000000000 +0200
+++ vice-1.20.pigi4/src/arch/unix/x11/xaw/uicolor.c       2007-04-08 22:58:25.000000000 +0200
@@ -121,7 +121,7 @@
     /* This is a kludge to map pixels to zimage values. Is there a better
        way to do this? //tvr */
     im = XCreateImage(display, visual, x11ui_get_display_depth(),
-                      ZPixmap, 0, (char *)data, 1, 1, 8, 1);
+                      ZPixmap, 0, (char *)data, 1, 1, 8, 0);
     if (!im) {
         log_error(LOG_DEFAULT, _("XCreateImage failed."));
         free(data);
--- vice-1.20/src/arch/unix/x11/gnome/uicolor.c        2006-07-22 18:28:40.000000000 +0200
+++ vice-1.20.pigi4/src/arch/unix/x11/gnome/uicolor.c     2007-04-08 22:58:26.000000000 +0200
@@ -167,7 +167,7 @@
        way to do this? //tvr */
     im = XCreateImage(display, GDK_VISUAL_XVISUAL(visual),
                       x11ui_get_display_depth(),
-                      ZPixmap, 0, (char *)data, 1, 1, 8, 1);
+                      ZPixmap, 0, (char *)data, 1, 1, 8, 0);
     if (!im) {
         log_error(LOG_DEFAULT, _("XCreateImage failed."));
         free(data);

Reply via email to