netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Baruch Siach <baruch@tkos.co.il>
Cc: Stephen Hemminger <stephen@networkplumber.org>, netdev@vger.kernel.org
Subject: Re: [PATCH] lib: fix multiple strlcpy definition
Date: Tue, 26 Sep 2017 17:55:24 +0200	[thread overview]
Message-ID: <20170926155524.GA26610@orbyte.nwl.cc> (raw)
In-Reply-To: <7f5fee59e46bfd3b4acf8ed9a8fbd8c7b4f1cd70.1506424129.git.baruch@tkos.co.il>

On Tue, Sep 26, 2017 at 02:08:49PM +0300, Baruch Siach wrote:
[...]
> diff --git a/configure b/configure
> index 7be8fb113cc9..787b2e061af9 100755
> --- a/configure
> +++ b/configure
> @@ -326,6 +326,27 @@ EOF
>      rm -f $TMPDIR/dbtest.c $TMPDIR/dbtest
>  }
>  
> +check_strlcpy()
> +{
> +    cat >$TMPDIR/strtest.c <<EOF
> +#include <string.h>
> +int main(int argc, char **argv) {
> +	char dst[10];
> +	strlcpy("test", dst, sizeof(dst));

You swapped source and destination here. It's not important for the
given use-case, but the resulting binary should segfault.

Apart from that, LGTM!

Cheers, Phil

  reply	other threads:[~2017-09-26 15:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-26 11:08 [PATCH] lib: fix multiple strlcpy definition Baruch Siach
2017-09-26 15:55 ` Phil Sutter [this message]
2017-09-26 16:27   ` Baruch Siach

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=20170926155524.GA26610@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=baruch@tkos.co.il \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /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;
as well as URLs for NNTP newsgroup(s).