emacs-devel
[Top][All Lists]
Advanced

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

Re: Willing to debug bug #3542 (23.0.94; File access via UNC path slow a


From: YAMAMOTO Mitsuharu
Subject: Re: Willing to debug bug #3542 (23.0.94; File access via UNC path slow again under Windows)
Date: Tue, 14 Jul 2009 09:31:42 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Mon, 13 Jul 2009 23:13:20 +0300, Eli Zaretskii <address@hidden> said:

> Aha.  But it sounds like it's not just me who is confused.  Here's
> just two examples:

>   From fileio.c:

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

>   (why +1? it potentially accesses memory beyond end of `filename's
>   contents)

It is necessary because SBYTES does not count the extra NUL character.
E.g., SBYTES (empty_unibyte_string) == 0, and
*(SDATA (empty_unibyte_string)) == '\0'.

                                     YAMAMOTO Mitsuharu
                                address@hidden




reply via email to

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