Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: serhe.popovych@gmail.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] dev: Correctly get length of alias string in dev_set_alias(),Re: [PATCH net-next] dev: Correctly get length of alias string in dev_set_alias()
Date: Wed, 20 Dec 2017 14:55:04 -0500 (EST)	[thread overview]
Message-ID: <20171220.145504.1817759866134770247.davem@davemloft.net> (raw)
In-Reply-To: <de0b307c-63e7-b786-e9d1-8b4a94f61d9a@gmail.com>

From: Serhey Popovich <serhe.popovych@gmail.com>
Date: Wed, 20 Dec 2017 21:44:46 +0200

> Sorry but I do not mean larger. I mean shorter. When nla_len() >
> strlen() we allocate extra space up to IFALIASZ - 1.

But the user typically does not do that.

> This is definitely fix nothing: we never get above the bounds, but
> in case if NULL terminator is in the middle of string with nla_len()
> we might allocate unused extra space.

See above, not worth optimizing for.

      reply	other threads:[~2017-12-20 19:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-18 21:38 [PATCH net-next] dev: Correctly get length of alias string in dev_set_alias() Serhey Popovych
2017-12-20 16:05 ` David Miller
2017-12-20 19:44   ` Serhey Popovich
2017-12-20 19:55     ` David Miller [this message]

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=20171220.145504.1817759866134770247.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=serhe.popovych@gmail.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