From: Richard Jones Date: Wed, 4 Nov 2009 11:33:29 +0000 (+0000) Subject: hivex: Check unchecked calloc (Jim Meyering). X-Git-Tag: 1.0.78~52 X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=commitdiff_plain;h=f95c697a44c321dd1d370620515aa71a71a4ad5b;hp=f8a0d6608221881a40d67affdc55f6c7bafd69a5 hivex: Check unchecked calloc (Jim Meyering). --- diff --git a/hivex/hivex.c b/hivex/hivex.c index b522ccf..4fa3b30 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. */