Re: [RFC patch 1/6] random: Simplify API for random address requests

Jason Cooper
2016-07-28T19:02:50Z

On Tue, Jul 26, 2016 at 10:07:22AM -0700, Kees Cook wrote:
> On Tue, Jul 26, 2016 at 10:00 AM, Jason Cooper <jason@lakedaemon.net> wrote:
...
> > if (range == 0 || ULONG_MAX - range < start)
> > return start;
>
> Should it "abort" like this? I was thinking just cap the range, something like:
>
> if (range > ULONG_MAX - start)
> range = ULONG_MAX - start

yes, will do.

thx,

Jason.