HomeFreeBSD

dd(1): Incorrect casting of arguments

Description

dd(1): Incorrect casting of arguments

dd(1) casts many of its numeric arguments from uintmax_t to intmax_t and
back again to detect whether or not the original arguments were negative.
This is not correct, and causes problems with boundary cases, for example
when count is SSIZE_MAX-1.

PR: 191263
Submitted by: will@worrbase.com
Reviewed by: pi, asomers
MFC after: 3 weeks

Details

Provenance
asomersAuthored on
Reviewer
pi
Parents
rS322892: MFC r321332:
Branches
Unknown
Tags
Unknown