From cc7b6e92c6b9200a59e60350bf8ca652a15fc604 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 30 Nov 2012 21:33:06 +0100 Subject: [PATCH] fdisk: zerosize EBR buffer Signed-off-by: Karel Zak --- fdisks/fdiskdoslabel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"), -- 2.47.3