Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Nikolay Borisov <nborisov@suse.com>
Cc: linux-crypto@vger.kernel.org
Subject: Re: [PATCH] lib/xxhash: make xxh{32,64}_update() return void
Date: Sat, 2 May 2020 09:46:20 -0700	[thread overview]
Message-ID: <20200502164620.GA840@sol.localdomain> (raw)
In-Reply-To: <367527ae-0471-e6be-eab2-c575e7b70564@suse.com>

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	other threads:[~2020-05-02 16:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-02  6:34 [PATCH] lib/xxhash: make xxh{32,64}_update() return void Eric Biggers
2020-05-02  8:01 ` Nikolay Borisov
2020-05-02 16:46   ` Eric Biggers [this message]
2020-05-15 19:15 ` Eric Biggers
2020-05-19  4:38   ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200502164620.GA840@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=nborisov@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox