tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: patch cat(1) improve -B
- Subject: Re: patch cat(1) improve -B
- From: "Kamil Rytarowski" <n54%gmx.com@localhost>
- Date: Tue, 3 Feb 2015 02:10:23 +0100
Me wrote:
> cat(1) says:
> -B bsize
> Read with a buffer size of bsize bytes, instead of the default
> buffer size which is the blocksize of the output file.
>
> I'm attaching a small patch:
> - documenting -B0 as back-ward compatible behavior,
> - handling invalid number parameter.
>
The original patch contained a subtle bug.
It was reusing strtoi(3), there is place for strtou(3).
As SIZE_MAX might be equal to UINTMAX_MAX and then
SIZE_MAX > INTMAX_MAX and it overflows.
Regards,
Home |
Main Index |
Thread Index |
Old Index