]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
dd(1): Incorrect casting of arguments
authorasomers <asomers@FreeBSD.org>
Fri, 25 Aug 2017 15:31:55 +0000 (15:31 +0000)
committerasomers <asomers@FreeBSD.org>
Fri, 25 Aug 2017 15:31:55 +0000 (15:31 +0000)
commita78f415b2a15d31eb4c280a2acffd51cd8d3cec6
tree94a2a49eef9f2c2f5ccb8d27f072ed0d72de597e
parente7e032eef99c4805ea0b5be60390073e0fc5e2ec
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
bin/dd/args.c
bin/dd/conv.c
bin/dd/dd.c
bin/dd/dd.h
bin/dd/position.c