Bug 11176 - fdisk partition size is limited by atoi
Summary: fdisk partition size is limited by atoi
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-24 15:11 UTC by dcaleca
Modified: 2018-07-25 12:43 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
replace atoi with strtoul (819 bytes, patch)
2018-07-24 15:12 UTC, dcaleca
Details

Note You need to log in before you can comment on or make changes to this bug.
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