Package: m4
Version: 1.4.8-1
Severity: normal
Tags: patch

`m4 -- nonexistent.m4' segfaults:

------------------------------------------------------------
$ m4 -- foo
Segmentation fault
------------------------------------------------------------

However without the "--" it works.

A patch that I believe fixes the problem:
------------------------------------------------------------
diff -rub m4-1.4.8/src/m4.c m4-1.4.8.fixed/src/m4.c
--- m4-1.4.8/src/m4.c   2006-11-20 15:55:47.000000000 +0200
+++ m4-1.4.8.fixed/src/m4.c     2007-01-04 22:24:57.000000000 +0200
@@ -551,7 +551,7 @@
     read_stdin = process_file ("-");
   else
     for (; optind < argc; optind++)
-      if (process_file (defines->arg))
+      if (process_file (argv[optind]))
        read_stdin = true;
 
   /* Now handle wrapup text.  */
------------------------------------------------------------

        Sami


-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-amd64
Locale: LANG=C, [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages m4 depends on:
ii  libc6                        2.3.6.ds1-9 GNU C Library: Shared libraries

m4 recommends no packages.

-- no debconf information

Attachment: signature.asc
Description: Digital signature

Reply via email to