unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Alexandre Oliva <aoliva@redhat.com>
Cc: emacs-pretest-bug@gnu.org
Subject: Re: memory corruption in regex.c
Date: Wed, 26 Mar 2008 18:51:56 -0400	[thread overview]
Message-ID: <87myol85f7.fsf@stupidchicken.com> (raw)
In-Reply-To: <orr6e2m6fw.fsf@oliva.athome.lsd.ic.unicamp.br> (Alexandre Oliva's message of "Sun\, 23 Mar 2008 01\:04\:51 -0300")

Alexandre Oliva <aoliva@redhat.com> writes:

> On Mar 22, 2008, Chong Yidong <cyd@stupidchicken.com> 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	other threads:[~2008-03-26 22:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-22 11:25 memory corruption in regex.c Alexandre Oliva
2008-03-22 21:34 ` Chong Yidong
2008-03-23  4:04   ` Alexandre Oliva
2008-03-26 22:51     ` Chong Yidong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87myol85f7.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=aoliva@redhat.com \
    --cc=emacs-pretest-bug@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).