Bugfix: size of temporary buffer increases until it can contain the
currently traversed object.
This commit is contained in:
parent
6358b74bac
commit
06dcd82a7d
1 changed files with 4 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue