Bug 545399

Summary: etags messes up filenames
Product: [Fedora] Fedora Reporter: Sjoerd Mullender <sjoerd>
Component: xemacsAssignee: Jerry James <loganjerry>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: loganjerry
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 21.5.29-8.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-18 04:29:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch for the problem described, replacing strcpy with memmove. none

Description Sjoerd Mullender 2009-12-08 13:30:54 UTC
Created attachment 376899 [details]
 Patch for the problem described, replacing strcpy with memmove.

Description of problem:
This is a bug against etags.xemacs which is packaged in xemacs-common, but there
is no separate component called xemacs-common.  This same bug exists in
etags.emacs, packaged in emacs-common.  See bug 545398.

When etags is run with filenames starting with "./", it normalizes them to
start without "./", but does so incorrectly, messing up the result.


Version-Release number of selected component (if applicable):
emacs-common-23.1-13.fc12.x86_64
xemacs-common-21.5.29-8.fc12.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Create a file with a C function and path e.g. src/gdk/gdk_atoms.c
2. Run /usr/bin/etags.xemacs ./src/gdk/gdk_atoms.c
3. Observe the filename in TAGS

Actual results:
The filename recorded in the TAGS file is src/gdk/gdk_otoms.c (note "o" after
underscore).

Expected results:
The filename should be src/gdk/gdk_atoms.c

Additional info:
The problem is a call to strcpy on overlapping buffers.  In Fedora 11 and
before that seems to have worked, but in Fedora 12 it often does not work, at
least not for slightly longer filenames.

The attached patch should also work for etags.emacs in emacs-common, except
for differing line numbers.

Comment 1 Jerry James 2009-12-08 16:53:47 UTC
Thank you very much for the patch, Sjoerd.  I have forwarded it to both the XEmacs project and to the etags maintainer, Francesco Potortì.  I will roll a new XEmacs package today to include this patch.

Comment 2 Fedora Update System 2009-12-08 18:09:48 UTC
xemacs-21.5.29-9.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/xemacs-21.5.29-9.fc12

Comment 3 Fedora Update System 2009-12-08 18:09:53 UTC
xemacs-21.5.29-8.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/xemacs-21.5.29-8.fc11

Comment 4 Fedora Update System 2009-12-10 04:11:34 UTC
xemacs-21.5.29-9.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update xemacs'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-12957

Comment 5 Fedora Update System 2009-12-10 04:12:05 UTC
xemacs-21.5.29-8.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update xemacs'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-12960

Comment 6 Fedora Update System 2009-12-18 04:29:35 UTC
xemacs-21.5.29-9.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2009-12-18 04:33:56 UTC
xemacs-21.5.29-8.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.