summaryrefslogtreecommitdiffstats
path: root/hivex
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-11-04 11:33:29 +0000
committerRichard Jones <rjones@redhat.com>2009-11-04 11:33:29 +0000
commitf95c697a44c321dd1d370620515aa71a71a4ad5b (patch)
treefa10831275ce37173bdb3d6bd226abfc4c311510 /hivex
parentf8a0d6608221881a40d67affdc55f6c7bafd69a5 (diff)
downloadlibguestfs-f95c697a44c321dd1d370620515aa71a71a4ad5b.tar.gz
libguestfs-f95c697a44c321dd1d370620515aa71a71a4ad5b.tar.xz
libguestfs-f95c697a44c321dd1d370620515aa71a71a4ad5b.zip
hivex: Check unchecked calloc (Jim Meyering).
Diffstat (limited to 'hivex')
-rw-r--r--hivex/hivex.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hivex/hivex.c b/hivex/hivex.c
index b522ccf8..4fa3b301 100644
--- a/hivex/hivex.c
+++ b/hivex/hivex.c
@@ -271,6 +271,8 @@ hivex_open (const char *filename, int flags)
}
h->bitmap = calloc (1 + h->size / 32, 1);
+ if (h->bitmap == NULL)
+ goto error;
#if 0 /* Doesn't work. */
/* Header checksum. */