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).
Created attachment 7671 [details] replace atoi with strtoul
Fixed in git