bug-m4
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug#405594: `m4 -- $FILENAME' segfaults (fwd)


From: Santiago Vila
Subject: Bug#405594: `m4 -- $FILENAME' segfaults (fwd)
Date: Fri, 5 Jan 2007 00:27:55 +0100 (CET)

Hello.

Received this from the Debian bug system, and I'm able to reproduce it.

---------- Forwarded message ----------
From: Sami Liedes <address@hidden>
To: Debian Bug Tracking System <address@hidden>
Date: Thu, 4 Jan 2007 22:37:59 +0200
Subject: Bug#405594: `m4 -- $FILENAME' segfaults

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

[...]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]