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:
0b31792
)
Fix use-after-free in hivex_close.
author
Richard W.M. Jones
<rjones@redhat.com>
Tue, 12 Apr 2011 16:59:47 +0000
(17:59 +0100)
committer
Richard W.M. Jones
<rjones@redhat.com>
Tue, 12 Apr 2011 16:59:47 +0000
(17:59 +0100)
Found using valgrind.
lib/hivex.c
patch
|
blob
|
history
diff --git
a/lib/hivex.c
b/lib/hivex.c
index
8a774de
..
860c85c
100644
(file)
--- a/
lib/hivex.c
+++ b/
lib/hivex.c
@@
-534,6
+534,9
@@
hivex_close (hive_h *h)
{
int r;
+ if (h->msglvl >= 1)
+ fprintf (stderr, "hivex_close\n");
+
free (h->bitmap);
if (!h->writable)
munmap (h->addr, h->size);
@@
-543,9
+546,6
@@
hivex_close (hive_h *h)
free (h->filename);
free (h);
- if (h->msglvl >= 1)
- fprintf (stderr, "hivex_close\n");
-
return r;
}