emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden (Pavel Janík)] Re: crash in emacs-21.1


From: Kenichi Handa
Subject: Re: address@hidden (Pavel Janík)] Re: crash in emacs-21.1
Date: Wed, 31 Oct 2001 08:48:02 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.0.107 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

address@hidden (Gerd Moellmann) writes:
> I think this copes with the buffer reallocation, but the reallocation
> isn't triggered with the elc files, and the result is identical to
> what it was before (same backtrace etc.).  Could you please check
> if I've made a stupid mistake here?

I don't know why reallocation isn't triggered, but...

[...]
> + static void
> + to_multibyte (p, end, nchars)
> +      char **p, **end;
> +      int *nchars;
> + {
> +   int nbytes;
> + 
> +   parse_str_as_multibyte (read_buffer, *p - read_buffer, &nbytes, nchars);
> +   if (nbytes > read_buffer_size)
> +     {
> +       int offset = *p - read_buffer;
> +       read_buffer_size *= 2;
> +       read_buffer = (char *) xrealloc (read_buffer, read_buffer_size);

This part is wrong.  We must make read_buffer_size surely
bigger than nbytes.

---
Ken'ichi HANDA
address@hidden



reply via email to

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