Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/ufs/ufs
On Sun, Feb 24, 2019 at 07:06:40PM +0000, Michael van Elst wrote:
> While here, also check for arithmetic overflow.
> + /* how much to actually read */
> + rawbufmax = callerbytes + skipstart;
> + if (rawbufmax < callerbytes)
> + return EINVAL;
hmm, I"m under the impression that checking for overflow without
upsetting the compiler is a delicate matter.
something like the overflow is undefined behaviour, so it cannot
happen, so the branch checking that it happened is eliminated.
Home |
Main Index |
Thread Index |
Old Index