On Sat, May 02, 2020 at 11:01:35AM +0300, Nikolay Borisov wrote:
> > +void xxh32_update(struct xxh32_state *state, const void *input,
> > +             const size_t len)
> >  {
> >     const uint8_t *p = (const uint8_t *)input;
> >     const uint8_t *const b_end = p + len;
> >  
> > -   if (input == NULL)
> > -           return -EINVAL;
> > -
> 
> Values calculated based on input are dereferenced further down, wouldn't
> that cause crashes in case input is null ?
> 

Only if len > 0, which would mean the caller provided an invalid buffer.

- Eric

Reply via email to