GNU bug report logs - #3772
23.0.95; Segmentation fault: ffap/image/C-x d

Previous Next

Package: emacs;

Reported by: jidanni <at> jidanni.org

Date: Mon, 6 Jul 2009 23:40:04 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #15 received at 3772-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Jason Rumney  <jasonr <at> gnu.org>
Cc: jidanni <at> jidanni.org, 3772-done <at> debbugs.gnu.org
Subject: Re: 23.0.95; Segmentation fault: ffap/image/C-x d
Date: Tue, 07 Jul 2009 18:29:09 -0400
> I can reproduce this.  From bisecting prior revisions, I think the
> problem first appeared with this change:
>
> 2009-03-24  Jason Rumney  <jasonr <at> gnu.org>
>
> 	* fileio.c (Fsubstitute_in_file_name): Always work on a copy.
> 	Calculate total size precisely.  Decode environment variables
> 	before substituting.  (Bug#38)

OK, I found the problem.  The way the string data was copied was
incorrect:

  nm = SDATA (filename);
  nm = strcpy (alloca (strlen (nm) + 1), nm);

This should have been

  nm = (unsigned char *) alloca (SBYTES (filename) + 1);
  bcopy (SDATA (filename), nm, SBYTES (filename) + 1);

I've checked a fix into CVS.



This bug report was last modified 16 years and 16 days ago.

Previous Next


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