Commit 0f6eb965 authored by unknown's avatar unknown

Fix for memory overlap in rt_split.c (reported by valgrind)


myisam/rt_split.c:
  Prevent memcpy if source and destination are same
parent cd5308cd
...@@ -326,6 +326,7 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, ...@@ -326,6 +326,7 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key,
cur2 = rt_PAGE_NEXT_KEY(cur2, key_length, nod_flag); cur2 = rt_PAGE_NEXT_KEY(cur2, key_length, nod_flag);
++n2; ++n2;
} }
if (to != cur->key)
memcpy(to - nod_flag, cur->key - nod_flag, full_length); memcpy(to - nod_flag, cur->key - nod_flag, full_length);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment