GNU bug report logs - #35714
Parted destroys mbr_signature (Disk Identifier) when adding MBR bootcode

Previous Next

Package: parted;

Reported by: Matthijs Kooijman <matthijs <at> stdin.nl>

Date: Mon, 13 May 2019 14:21:03 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Phillip Susi <phill <at> thesusis.net>
To: Matthijs Kooijman <matthijs <at> stdin.nl>
Cc: 35714 <at> debbugs.gnu.org
Subject: bug#35714: Parted destroys mbr_signature (Disk Identifier) when adding MBR bootcode
Date: Thu, 16 May 2019 09:13:55 -0400
Matthijs Kooijman writes:

> Hi folks,
>
> I believe I found a bug in the dos partition table writer. Let me start
> with the cause. There's this bit of code:
>
> 	if (!table->boot_code[0]) {
> 		memset (table->boot_code, 0, 512);
> 		memcpy (table->boot_code, MBR_BOOT_CODE, sizeof (MBR_BOOT_CODE));
> 	}

Yikes! Clearly this should have been sizeof( table->boot_code ) rather
than 512.





This bug report was last modified 6 years and 35 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.