git.annexia.org
/
hivex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
310dcfa
)
hivex: allocate_block should update valid block bitmap.
author
Richard Jones
<rjones@redhat.com>
Thu, 4 Feb 2010 16:29:32 +0000
(16:29 +0000)
committer
Richard Jones
<rjones@redhat.com>
Fri, 19 Feb 2010 15:01:34 +0000
(15:01 +0000)
The internal allocate_block() function wasn't updating the bitmap,
so if you revisited a block which you had allocated in the same
session, you could get an EFAULT error.
hivex/hivex.c
patch
|
blob
|
history
diff --git
a/hivex/hivex.c
b/hivex/hivex.c
index
6b4b9d8
..
2a094b8
100644
(file)
--- a/
hivex/hivex.c
+++ b/
hivex/hivex.c
@@
-1847,6
+1847,8
@@
allocate_block (hive_h *h, size_t seg_len, const char id[2])
blockhdr->id[1] = id[1];
}
+ BITMAP_SET (h->bitmap, offset);
+
h->endblocks += seg_len;
/* If there is space after the last block in the last page, then we