Package: xgraph
Version: 12.1-12
Severity: important
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu maverick ubuntu-patch

The segfault occurs on 64 bit systems; it does not occur on 32 bit systems.
The reason for the segfault is that with the old definition of NE an unadorned 
0 is passed as a variadic parameter to variadic functions expecting pointers
(xtb_hort() and xtb_vert() declared in xtb.h)
 
The compiler has no way to know that is has to convert the 0 constant
to a NULL pointer (and cannot warn as the function is not printf() like).

*** /tmp/tmp_OaVWf
In Ubuntu, we've applied the attached patch to achieve the following:

  * change the #define of NE (xtb.h) from 0 to ((xtb_fmt*)0) (LP: #1175701) 

We thought you might be interested in doing the same. 


-- System Information:
Debian Release: squeeze/sid
  APT prefers lucid-updates
  APT policy: (500, 'lucid-updates'), (500, 'lucid-security'), (500, 'lucid')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-46-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
=== modified file 'debian/changelog'

=== modified file 'xtb.h'
--- xtb.h	2009-03-08 21:00:13 +0000
+++ xtb.h	2013-05-02 17:35:10 +0000
@@ -164,7 +164,7 @@
     xtb_fmt_align align;
 } xtb_fmt;
 
-#define NE	0
+#define NE	((xtb_fmt*)0)
 
 DECLARE(xtb_w, xtb_fmt *, (xtb_frame *w));
    /* Returns formatting structure for frame */

Reply via email to