emacs-devel
[Top][All Lists]
Advanced

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

Re: memory corruption in regex.c


From: Chong Yidong
Subject: Re: memory corruption in regex.c
Date: Wed, 26 Mar 2008 18:51:56 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2.50 (gnu/linux)

Alexandre Oliva <address@hidden> writes:

> On Mar 22, 2008, Chong Yidong <address@hidden> wrote:
>
>>> -    re_char *old_buffer = bufp->buffer;                                    
>>> \
>>> +    unsigned char *old_buffer = bufp->buffer;                              
>>> \
>
>> What is the purpose of this?
>
> Compiler warning avoidance.  b is unsigned char *, whereas re_char is
> const unsigned char *.  I suppose it would be enough for new_buffer to
> be non-const, but these buffers are not const anyway, and the
> constness doesn't buy much at this point.

Thanks.

I've checked in your patch.




reply via email to

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