Package: siggen
Version: 2.3.10-1
Severity: normal
Tags: patch

Whenever any of the siggen programs try to print an error message on
amd64, they crash with a segmentation fault, e.g.:

$ signalgen 
Segmentation fault
$ signalgen --help
Segmentation fault
$ signalgen -v test
signalgen  Ver. 2.3.10 (May 2008)   Digital Signal Generator
Segmentation fault

This happens because misc.c is missing <string.h>, and so the return
type of strerror() is incorrectly assumed to be "int" instead of a
pointer.  The attached patch fixes the problem.  It also adds another
prototype to avoid a compiler warning and potentially fix another bug.

-jim

-- System Information:
Debian Release: lenny/sid
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'unstable'), (500, 'testing'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.27.3 (SMP w/4 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages siggen depends on:
ii  libc6                     2.7-18         GNU C Library: Shared libraries
ii  libncurses5               5.6+20080830-1 shared libraries for terminal hand

siggen recommends no packages.

siggen suggests no packages.

-- no debconf information
diff -urN siggen-2.3.10-orig/config.h siggen-2.3.10/config.h
--- siggen-2.3.10-orig/config.h	2009-04-03 16:07:03.000000000 -0400
+++ siggen-2.3.10/config.h	2009-04-03 16:09:12.000000000 -0400
@@ -245,5 +245,6 @@
  */
 
 char *get_conf_value();
+char **getWavNames();
 
 #endif   /*  _config_siggen_h */
diff -urN siggen-2.3.10-orig/misc.c siggen-2.3.10/misc.c
--- siggen-2.3.10-orig/misc.c	2009-04-03 16:07:03.000000000 -0400
+++ siggen-2.3.10/misc.c	2009-04-03 16:07:14.000000000 -0400
@@ -27,6 +27,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 #include <limits.h>
+#include <string.h>
 #include "config.h"
 /*
  * delay(us)  wait us microsecs using select. Effectively

Reply via email to