svn commit: r322893 - head/bin/dd

Alan Somers asomers at freebsd.org
Fri Aug 25 17:08:13 UTC 2017


Nope.  Do you mean negative offsets for the iseek argument?  I didn't
know you could do that.

On Fri, Aug 25, 2017 at 10:59 AM, Conrad Meyer <cem at freebsd.org> wrote:
> Hi Alan,
>
> By any chance did you test this change with /dev/kmem and kernel
> addresses ("negative" off_t values)?
>
> Thanks,
> Conrad
>
> On Fri, Aug 25, 2017 at 8:31 AM, Alan Somers <asomers at freebsd.org> wrote:
>> Author: asomers
>> Date: Fri Aug 25 15:31:55 2017
>> New Revision: 322893
>> URL: https://svnweb.freebsd.org/changeset/base/322893
>>
>> Log:
>>   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 at worrbase.com
>>   Reviewed by:  pi, asomers
>>   MFC after:    3 weeks


More information about the svn-src-all mailing list