OSDN Git Service
(root)
/
android-x86
/
system-extras.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f3df372
)
ext4_utils: Fix off-by-one bug in dentry size calculation
author
Colin Cross
<ccross@android.com>
Wed, 26 Jan 2011 05:44:37 +0000
(21:44 -0800)
committer
Colin Cross
<ccross@android.com>
Wed, 26 Jan 2011 07:42:04 +0000
(23:42 -0800)
Change-Id: I1a1833dfd5d896acd1d823f8dbe925b8ff1fd5da
ext4_utils/contents.c
patch
|
blob
|
history
diff --git
a/ext4_utils/contents.c
b/ext4_utils/contents.c
index
0f816b8
..
ba7e05f
100644
(file)
--- a/
ext4_utils/contents.c
+++ b/
ext4_utils/contents.c
@@
-51,7
+51,7
@@
static struct ext4_dir_entry_2 *add_dentry(u8 *data, u32 *offset,
struct ext4_dir_entry_2 *dentry;
u32 start_block = *offset / info.block_size;
- u32 end_block = (*offset + rec_len) / info.block_size;
+ u32 end_block = (*offset + rec_len
- 1
) / info.block_size;
if (start_block != end_block) {
/* Adding this dentry will cross a block boundary, so pad the previous
dentry to the block boundary */