From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] net: Check network device driver name
Date: Thu, 1 Sep 2011 10:12:06 -0400 [thread overview]
Message-ID: <201109011012.06873.vapier@gentoo.org> (raw)
In-Reply-To: <1314696613-31095-1-git-send-email-monstr@monstr.eu>
On Tuesday, August 30, 2011 05:30:13 Michal Simek wrote:
> --- a/net/eth.c
> +++ b/net/eth.c
> @@ -224,6 +224,14 @@ int eth_write_hwaddr(struct eth_device *dev, const
> char *base_name, int eth_register(struct eth_device *dev)
> {
> struct eth_device *d;
> +
> + size_t len = strlen(dev->name);
> + if (len >= NAMESIZE) {
> + printf("Network driver name is too long (%zu >= %zu): %s\n",
> + len, NAMESIZE, dev->name);
> + return -1;
> + }
thinking a little more, i wonder if this wouldnt be better as an assert() or
BUG_ON(). this isnt a normal issue and generally gets caught once -- during
development of a new board.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110901/7c75798a/attachment.pgp
next prev parent reply other threads:[~2011-09-01 14:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-30 9:30 [U-Boot] [PATCH v2] net: Check network device driver name Michal Simek
2011-09-01 14:12 ` Mike Frysinger [this message]
2011-09-02 9:27 ` Michal Simek
2011-09-04 21:29 ` Wolfgang Denk
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=201109011012.06873.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=u-boot@lists.denx.de \
/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