Bugfix: size of temporary buffer increases until it can contain the

currently traversed object.
This commit is contained in:
Gilad Arnold 2004-12-17 01:50:37 +00:00
parent 6358b74bac
commit 06dcd82a7d

View file

@ -1047,7 +1047,10 @@ pobj_update_recursive (void *obj, int persist)
/* Grow temporary buffer as necessary. */
if (POBJ_SIZE (p->size) > tmp_size) {
XFREE (tmp);
tmp_size *= TMPBUF_GROW_FACTOR;
while (POBJ_SIZE (p->size) > tmp_size)
tmp_size *= TMPBUF_GROW_FACTOR;
tmp = XMALLOC (tmp_size);
if (! tmp) {
debug ("error: allocation of temporary buffer failed");