summaryrefslogtreecommitdiff
path: root/myisam/rt_split.c
diff options
context:
space:
mode:
authorhf@deer.(none) <>2003-11-04 18:59:49 +0400
committerhf@deer.(none) <>2003-11-04 18:59:49 +0400
commitaa2869a336783802af0c0d624788a610e99805d2 (patch)
tree1797699cfb58133abdfea5c8c888160724fd2235 /myisam/rt_split.c
parent15c8f37789aa50f22bc979db0c57941ea8dfb4f8 (diff)
downloadmariadb-git-aa2869a336783802af0c0d624788a610e99805d2.tar.gz
Fix for memory overlap in rt_split.c (reported by valgrind)
Diffstat (limited to 'myisam/rt_split.c')
-rw-r--r--myisam/rt_split.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/myisam/rt_split.c b/myisam/rt_split.c
index 41d6f8f8ccd..62b8ea6a65b 100644
--- a/myisam/rt_split.c
+++ b/myisam/rt_split.c
@@ -326,7 +326,8 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key,
cur2 = rt_PAGE_NEXT_KEY(cur2, key_length, nod_flag);
++n2;
}
- memcpy(to - nod_flag, cur->key - nod_flag, full_length);
+ if (to != cur->key)
+ memcpy(to - nod_flag, cur->key - nod_flag, full_length);
}
mi_putint(page, 2 + n1 * full_length, nod_flag);