https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224845
Mitchell Horne <mhorne...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mhorne...@gmail.com --- Comment #1 from Mitchell Horne <mhorne...@gmail.com> --- (In reply to Bulat from comment #0) What appears different between the FreeBSD and OpenBSD implementations of dd is that FreeBSD supports the 't' (tera) and 'p' (peta) file size options on the command line. So on systems where size_t is implemented as 32 bits, some information would be lost if the user were to input a large file size. By using uintmax_t, it (almost) guarantees that the entirety of the user's input size is captured, as uintmax_t is at least 64 bits wide. In the case that the largest possible file size is smaller than the user's input, SIZE_MAX is used instead. An example: The user inputs "1t" as a file size on a system where size_t is 32-bits wide. The value 1 is taken and bit shifted 40 times (1TB = 2^40 bytes), and the 32 bit value of size_t is filled with only zeros, resulting in a 0 byte output file or an error. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ freebsd-bugs@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"