bug-m4
[Top][All Lists]
Advanced

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

Re: Patch:Found m4 (GUN) Bug! [was: m4 (GNU) Buffer Overflow, Slackware


From: Andreas Schwab
Subject: Re: Patch:Found m4 (GUN) Bug! [was: m4 (GNU) Buffer Overflow, Slackware Confirmed] (fwd)
Date: 09 Feb 2001 14:59:45 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.98

address@hidden (Derek Kwan) writes:

|> I have include a quick patch to the souce code.... I just changed the call
|> from error to fprintf (to stderr).

Here is a proper patch, also fixes the other place with the same bug.

2001-02-09  Andreas Schwab  <address@hidden>

        * src/m4.c (main): Fix improper uses of error (missing format
        string).

--- src/m4.c
+++ src/m4.c    2001/02/09 13:49:15
@@ -445,7 +445,7 @@
 
       case 'o':
        if (!debug_set_output (optarg))
-         error (0, errno, optarg);
+         error (0, errno, "%s", optarg);
        break;
 
       case 's':
@@ -575,7 +575,7 @@
            fp = path_search (argv[optind], &filename);
            if (fp == NULL)
              {
-               error (0, errno, argv[optind]);
+               error (0, errno, "%s", argv[optind]);
                exit_status = EXIT_FAILURE;
                continue;
              }

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
address@hidden
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg



reply via email to

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