From: Paul Eggert Date: Wed, 13 Jul 2011 01:15:33 +0000 (-0700) Subject: * buffer.c (Fget_buffer_create): Initialized inhibit_shrinking. X-Git-Tag: emacs-pretest-24.0.90~104^2~333 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2941c447ebada8126c27065f78c31895f69c738e;p=emacs.git * buffer.c (Fget_buffer_create): Initialized inhibit_shrinking. The old code sometimes used this field without initializing it. --- diff --git a/src/ChangeLog b/src/ChangeLog index 386ed435b2a..e8824f3a15f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-07-13 Paul Eggert + * buffer.c (Fget_buffer_create): Initialized inhibit_shrinking. + The old code sometimes used this field without initializing it. + * alloc.c (gc_sweep): Don't read past end of array. In theory, the old code could also have corrupted Emacs internals, though it'd be very unlikely. diff --git a/src/buffer.c b/src/buffer.c index 1b8b1117893..776888e30ac 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -361,6 +361,7 @@ even if it is dead. The return value is never nil. */) BUF_END_UNCHANGED (b) = 0; BUF_BEG_UNCHANGED (b) = 0; *(BUF_GPT_ADDR (b)) = *(BUF_Z_ADDR (b)) = 0; /* Put an anchor '\0'. */ + b->text->inhibit_shrinking = 0; b->newline_cache = 0; b->width_run_cache = 0;