git: fdisk(8): Fix uint32_t overflow in print_part()

Aaron LI aly at crater.dragonflybsd.org
Wed Feb 11 17:43:15 PST 2026


commit 1eb871005728074c90e0aef8342abaae9eced85b
Author: Aaron LI <aly at aaronly.me>
Date:   Thu Feb 12 09:34:02 2026 +0800

    fdisk(8): Fix uint32_t overflow in print_part()
    
    dp_size is uint32_t and would overflow when is multipled by secsize
    (512), and that resulted in printing a wrong partition size in MB.
    
    While there, tweak 'Meg' to 'MB' to be clearer.

Summary of changes:
 sbin/fdisk/fdisk.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/1eb871005728074c90e0aef8342abaae9eced85b


-- 
DragonFly BSD source repository


More information about the Commits mailing list