ref: 3e94292dc3da4ee80c088bdbd108d5372dd4e1b5
parent: bb7d733361ff886cb540fdd3d98077ef5b85f562
author: ngkaho1234 <ngkaho1234@gmail.com>
date: Thu Feb 4 10:28:05 EST 2016
ext4_extent: fix passing wrong size to memmove.
--- a/src/ext4_extent.c
+++ b/src/ext4_extent.c
@@ -1419,7 +1419,8 @@
ex2 = ex;
if (ex2 <= EXT_LAST_EXTENT(eh))
- memmove(start_ex, ex2, EXT_LAST_EXTENT(eh) - ex2 + 1);
+ memmove(start_ex, ex2,
+ (EXT_LAST_EXTENT(eh) - ex2 + 1) * sizeof(struct ext4_extent));
eh->entries_count = to_le16(new_entries);
ext4_ext_dirty(inode_ref, path + depth);