diff options
author | Keith Bostic <keith@wiredtiger.com> | 2013-05-30 19:52:56 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2013-05-30 19:52:56 -0400 |
commit | 4536f166a8bec4ec9fe422b4184ac6010f53680b (patch) | |
tree | dcff444cf78686c2130355dd405bf4b13a76c298 | |
parent | 0c0e1fea6bf8ed00c829aa6e6c5ddb4eb17125ce (diff) | |
download | mongo-4536f166a8bec4ec9fe422b4184ac6010f53680b.tar.gz |
Fix a core dump, the realloc has to change to match the backup cursor's
new structure sizing.
-rw-r--r-- | src/cursor/cur_backup.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cursor/cur_backup.c b/src/cursor/cur_backup.c index e5f3880753e..845213b9ae1 100644 --- a/src/cursor/cur_backup.c +++ b/src/cursor/cur_backup.c @@ -443,9 +443,11 @@ __backup_list_append( int need_handle; /* Leave a NULL at the end to mark the end of the list. */ - if (cb->list_next + 1 * sizeof(char *) >= cb->list_allocated) + if ((cb->list_next + 1) * + sizeof(WT_CURSOR_BACKUP_ENTRY) >= cb->list_allocated) WT_RET(__wt_realloc(session, &cb->list_allocated, - (cb->list_next + 100) * sizeof(char *), &cb->list)); + (cb->list_next + 100) * + sizeof(WT_CURSOR_BACKUP_ENTRY *), &cb->list)); p = &cb->list[cb->list_next]; p[0].name = p[1].name = NULL; p[0].handle = p[1].handle = NULL; |