From: Karel Zak Date: Fri, 30 Nov 2012 20:33:06 +0000 (+0100) Subject: fdisk: zerosize EBR buffer X-Git-Tag: v2.23-rc1~464 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc7b6e92c6b9200a59e60350bf8ca652a15fc604;p=thirdparty%2Futil-linux.git fdisk: zerosize EBR buffer Signed-off-by: Karel Zak --- diff --git a/fdisks/fdiskdoslabel.c b/fdisks/fdiskdoslabel.c index 078bd2ccca..bc8e550221 100644 --- a/fdisks/fdiskdoslabel.c +++ b/fdisks/fdiskdoslabel.c @@ -68,7 +68,7 @@ static void read_pte(struct fdisk_context *cxt, int pno, sector_t offset) struct pte *pe = &ptes[pno]; pe->offset = offset; - pe->sectorbuffer = xmalloc(cxt->sector_size); + pe->sectorbuffer = xcalloc(1, cxt->sector_size); if (read_sector(cxt, offset, pe->sectorbuffer) != 0) fprintf(stderr, _("Failed to read extended partition table (offset=%jd)\n"),