summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2013-05-30 19:52:56 -0400
committerKeith Bostic <keith@wiredtiger.com>2013-05-30 19:52:56 -0400
commit4536f166a8bec4ec9fe422b4184ac6010f53680b (patch)
treedcff444cf78686c2130355dd405bf4b13a76c298
parent0c0e1fea6bf8ed00c829aa6e6c5ddb4eb17125ce (diff)
downloadmongo-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.c6
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;