]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: zerosize EBR buffer
authorKarel Zak <kzak@redhat.com>
Fri, 30 Nov 2012 20:33:06 +0000 (21:33 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 30 Nov 2012 20:33:06 +0000 (21:33 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisks/fdiskdoslabel.c

index 078bd2cccae7c862489ff57e797cf1090ae33012..bc8e55022168249a2978126d198d740b9023540b 100644 (file)
@@ -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"),