+2006-01-24 Chong Yidong <cyd@stupidchicken.com>
+
+ * alloc.c (allocate_string_data): Update next_free immediately, to
+ reduce risk of memory clobberage.
+
2006-01-24 L\e$,1 q\e(Brentey K\e,Aa\e(Broly <lorentey@elte.hu>
* xdisp.c (handle_invisible_prop): Set it->position to fix cursor
old_nbytes = GC_STRING_BYTES (s);
data = b->next_free;
+ b->next_free = (struct sdata *) ((char *) data + needed + GC_STRING_EXTRA);
+
data->string = s;
s->data = SDATA_DATA (data);
#ifdef GC_CHECK_STRING_BYTES
bcopy (string_overrun_cookie, (char *) data + needed,
GC_STRING_OVERRUN_COOKIE_SIZE);
#endif
- b->next_free = (struct sdata *) ((char *) data + needed + GC_STRING_EXTRA);
/* If S had already data assigned, mark that as free by setting its
string back-pointer to null, and recording the size of the data