GNU bug report logs - #10592
movemail.c's error function and certain compiler flags

Previous Next

Package: emacs;

Reported by: Rob Browning <rlb <at> defaultvalue.org>

Date: Tue, 24 Jan 2012 05:06:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#10592: closed (movemail.c's error function and certain
 compiler flags)
Date: Tue, 31 Jan 2012 04:23:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 30 Jan 2012 20:22:03 -0800
with message-id <4F276C6B.5010508 <at> cs.ucla.edu>
and subject line Re: bug#10592: Bug#655118: Please enabled hardened build flags
has caused the debbugs.gnu.org bug report #10592,
regarding movemail.c's error function and certain compiler flags
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
10592: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10592
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Rob Browning <rlb <at> defaultvalue.org>
To: bug-gnu-emacs <at> gnu.org
Cc: 655118-forwarded <at> bugs.debian.org, 655118 <at> bugs.debian.org,
	Moritz Mühlenhoff <jmm <at> inutil.org>
Subject: Re: Bug#655118: Please enabled hardened build flags
Date: Mon, 23 Jan 2012 23:05:26 -0600
(Sorry, accidentally hit send too early.)

Mortiz updated Emacs to support -Wformat -Wformat-security
-Werror=format-security.

Here are the relevant changes (further details are available at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=655118):

diff -aur emacs23-23.3+1.orig/lib-src/movemail.c emacs23-23.3+1/lib-src/movemail.c
--- emacs23-23.3+1.orig/lib-src/movemail.c	2011-12-29 05:07:27.000000000 +0100
+++ emacs23-23.3+1/lib-src/movemail.c	2012-01-08 17:31:22.000000000 +0100
@@ -615,11 +615,11 @@
 {
   fprintf (stderr, "movemail: ");
   if (s3)
-    fprintf (stderr, s1, s2, s3);
+    fprintf (stderr, "%s%s%s", s1, s2, s3);
   else if (s2)
-    fprintf (stderr, s1, s2);
+    fprintf (stderr, "%s%s", s1, s2);
   else
-    fprintf (stderr, s1);
+    fprintf (stderr, "%s", s1);
   fprintf (stderr, "\n");
 }
 
Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4


[Message part 3 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 10592-done <at> debbugs.gnu.org
Cc: 655118 <at> bugs.debian.org, Rob Browning <rlb <at> defaultvalue.org>
Subject: Re: bug#10592: Bug#655118: Please enabled hardened build flags
Date: Mon, 30 Jan 2012 20:22:03 -0800
I am not observing this problem in the Emacs trunk, with either
GCC 4.6.2 or GCC 4.7.0 20120127 (experimental), when I compile
with -Wformat -Wformat-security.  I suspect the problem has
already been fixed in the trunk in a different way, by
rewriting movemail to use prototypes.  I'm therefore taking
the liberty of marking this bug as fixed in the Emacs bug
database; please feel free to reopen it if I've misunderstood
the situation.


This bug report was last modified 13 years and 119 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.