Package: xnee
Version: 3.02-2
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu jaunty ubuntu-patch

pnee applet crashes in various places due to NULL pointer deference:

(gdb) backtrace
#0  0xb748532e in xnee_is_type_nr_set (xd=0x8c56558, type=4, nr=21) at 
xnee_range.c:666
#1  0xb74863e3 in xnee_set_ranges (xd=0x8c56558) at xnee_range.c:68
#2  0xb747b890 in xnee_replay_main_loop (xd=0x8c56558, read_mode=20) at 
xnee_replay.c:280
#3  0xb7475dfc in xnee_start (xd=0x8c56558) at xnee.c:225
#4  0x0805233e in ?? ()
#5  0xb74544ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#6  0xb73d033e in clone () from /lib/tls/i686/cmov/libc.so.6
(gdb) list
661       int i ; 
662     
663       for (i=0; i<xrs->type[type].index ;i++)
664         {
665           if ( xrs->type[type].data[i] == nr )
666             {
667               return True;
668             }
669         }
670     
(gdb)

Upstream fixed this issue with the attached patch.

Since pnee support has been dropped recently, this patch should help to bring
it back again. Thank you!

-- System Information:
Debian Release: 5.0
  APT prefers jaunty
  APT policy: (500, 'jaunty')
Architecture: i386 (i686)

Kernel: Linux 2.6.28-3-generic (SMP w/1 CPU core)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- xnee-3.02.orig/debian/patches/pnee_SIGSEGV.patch
+++ xnee-3.02/debian/patches/pnee_SIGSEGV.patch
@@ -0,0 +1,14 @@
+Upstream: 
http://cvs.savannah.gnu.org/viewvc/xnee/libxnee/src/xnee_range.c?root=xnee&r1=1.33&r2=1.34&view=patch
+
+Index: xnee-3.02/libxnee/src/xnee_range.c
+===================================================================
+--- xnee-3.02.orig/libxnee/src/xnee_range.c    2008-12-24 00:25:19.217720011 
+0100
++++ xnee-3.02/libxnee/src/xnee_range.c 2008-12-24 00:48:46.173725231 +0100
+@@ -181,6 +181,7 @@
+    {
+      XNEE_FREE_AND_NULL(xrs->type[i].data);
+      xrs->type[i].data = NULL;
++     xrs->type[i].index = 0;
+    }
+    need_init = 1 ;
+    

Reply via email to