GNU bug report logs - #4992
Invalid use of strcpy() in etags

Previous Next

Package: emacs;

Reported by: Tobias Ringström <tobias <at> ringis.se>

Date: Fri, 20 Nov 2009 15:50:04 UTC

Severity: normal

Done: Jan Djärv <jan.h.d <at> swipnet.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (Emacs bug Tracking System)
To: Tobias Ringström <tobias <at> ringis.se>
Subject: bug#4992 closed by Jan Djärv <jan.h.d <at> swipnet.se>
 (Re: bug#4992: Invalid use of strcpy() in etags)
Date: Mon, 23 Nov 2009 10:00:09 +0000
[Message part 1 (text/plain, inline)]
This is an automatic notification regarding your bug report
which was filed against the emacs,etags package:

#4992: Invalid use of strcpy() in etags

It has been closed by Jan Djärv <jan.h.d <at> swipnet.se>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Jan Djärv <jan.h.d <at> swipnet.se> by
replying to this email.


-- 
4992: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4992
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Tobias Ringström <tobias <at> ringis.se>,
        4992 <at> debbugs.gnu.org
Cc: bug-gnu-emacs <at> gnu.org, 4992-done <at> debbugs.gnu.org
Subject: Re: bug#4992: Invalid use of strcpy() in etags
Date: Mon, 23 Nov 2009 10:51:42 +0100
Tobias Ringström skrev:
> The function absolute_filename() lib-src/etags.c has two invalid calls 
> to strcpy() with overlapping arguments. It's undefined C that often 
> happens to work, but breaks very badly for at least gcc 4.4.2 and glibc 
> 2.11 on x86_64, which is default for Fedora 12.
> 
> The attached patch replaces the bogus strcpy() calls with calls to 
> memmove().
> 

Checked in, thanks.

	Jan D.
[Message part 3 (message/rfc822, inline)]
From: Tobias Ringström <tobias <at> ringis.se>
To: bug-gnu-emacs <at> gnu.org
Subject: Invalid use of strcpy() in etags
Date: Fri, 20 Nov 2009 16:43:05 +0100
[Message part 4 (text/plain, inline)]
The function absolute_filename() lib-src/etags.c has two invalid calls 
to strcpy() with overlapping arguments. It's undefined C that often 
happens to work, but breaks very badly for at least gcc 4.4.2 and glibc 
2.11 on x86_64, which is default for Fedora 12.

The attached patch replaces the bogus strcpy() calls with calls to 
memmove().

/Tobias

[emacs-23.1-strcpy-bug.patch (text/plain, attachment)]

This bug report was last modified 15 years and 185 days ago.

Previous Next


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