Bug 11176

Summary: fdisk partition size is limited by atoi
Product: Busybox Reporter: dcaleca
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:
Attachments: replace atoi with strtoul

Description dcaleca 2018-07-24 15:11:40 UTC
Except when using the default values, fdisk cannot create partitions bigger than 1TB (when using 512 bytes sectors, on 32 bits architectures).

This is because there is a type mismatch between sector_t (unsigned int) and atoi (int).
Comment 1 dcaleca 2018-07-24 15:12:45 UTC
Created attachment 7671 [details]
replace atoi with strtoul
Comment 2 Denys Vlasenko 2018-07-25 12:43:52 UTC
Fixed in git