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: Alexandre Oliva
Subject: Re: memory corruption in regex.c
Date: Sun, 23 Mar 2008 01:04:51 -0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

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.

-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member         http://www.fsfla.org/
Red Hat Compiler Engineer   address@hidden, gcc.gnu.org}
Free Software Evangelist  address@hidden, gnu.org}




reply via email to

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