Package: hotkeys
Severity: normal

The code does not check for NULL pointers returend from getConfig() when
configuring alsa. The following patch implements proper checking before
passing the return values of getConfig() to strdup:

--- hotkeys.c   2009-05-06 19:21:45.000000000 +0200
+++ hotkeys.c.new       2009-05-06 19:21:41.000000000 +0200
@@ -1566,6 +1566,7 @@
 main(int argc, char *argv[])
 {
     XkbEvent    ev;
+    char *alsacard, *alsacontrols;
 
     errorFile = stderr;
     openlog( PACKAGE, LOG_CONS | LOG_PID, LOG_USER );
@@ -1579,8 +1580,11 @@
     if ( !parseArgs(argc,argv) )
         bailout();
 
-    if ( configALSA(strdup(getConfig("ALSAcard")), 
strdup(getConfig("ALSAcontrols"))) == 0)
+    alsacard = getConfig("ALSAcard");
+    alsacontrols = getConfig("ALSAcontrols");
+    if(alsacard && alsacontrols && configALSA(alsacard, alsacontrols) == 0) {
            haveALSA = True;
+    }
 
 #if HAVE_GTK
     if ( !noSplash )



-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (30, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.28.4 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages hotkeys depends on:
ii  libasound2                  1.0.19-1     shared library for ALSA applicatio
ii  libatk1.0-0                 1.24.0-2     The ATK accessibility toolkit
ii  libc6                       2.9-4        GNU C Library: Shared libraries
ii  libcairo2                   1.8.6-2+b1   The Cairo 2D vector graphics libra
ii  libdb4.7                    4.7.25-6     Berkeley v4.7 Database Libraries [
ii  libfontconfig1              2.6.0-3      generic font configuration library
ii  libfreetype6                2.3.9-4      FreeType 2 font engine, shared lib
ii  libglib2.0-0                2.20.0-2     The GLib library of C routines
ii  libgtk2.0-0                 2.16.1-2     The GTK+ graphical user interface 
ii  libpango1.0-0               1.24.0-3+b1  Layout and rendering of internatio
ii  libx11-6                    2:1.2.1-1    X11 client-side library
ii  libxext6                    2:1.0.4-1    X11 miscellaneous extension librar
ii  libxinerama1                2:1.0.3-2    X11 Xinerama extension library
ii  libxml2                     2.7.3.dfsg-1 GNOME XML library
ii  libxmu6                     2:1.0.4-1    X11 miscellaneous utility library
ii  libxosd2                    2.2.14-1.7   X On-Screen Display library - runt
ii  libxrandr2                  2:1.3.0-2    X11 RandR extension library
ii  libxrender1                 1:0.9.4-2    X Rendering Extension client libra

hotkeys recommends no packages.

hotkeys suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to