bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#35714: Parted destroys mbr_signature (Disk Identifier) when adding M


From: Phillip Susi
Subject: bug#35714: Parted destroys mbr_signature (Disk Identifier) when adding MBR bootcode
Date: Thu, 16 May 2019 09:13:55 -0400
User-agent: mu4e 0.9.18; emacs 25.2.2

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.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]