archive mirror
 help / color / mirror / Atom feed
From: Daniel Wagner <>
Subject: Re: [PATCH v1 0/2] Fix -Werror=array-bounds errors
Date: Wed, 23 Jun 2021 09:38:59 +0200	[thread overview]
Message-ID: <20210623073859.lzf4xrhilu3maewi@beryllium.lan> (raw)
In-Reply-To: <>

On Tue, Jun 22, 2021 at 09:49:31AM +0200, Daniel Wagner wrote:
> gcc complains with
>   src/rtnl.c: In function ‘send_getlink’:
>   src/rtnl.c:1485:12: error: array subscript ‘struct rtnl_request[0]’ is partly outside array bounds of ‘unsigned char[17]’ [-Werror=array-bounds]
>    1485 |         req->hdr.nlmsg_len = RTNL_REQUEST_SIZE;
>         |            ^~
> The netlink helper 'struct rtnl_request' doesn't include any padding
> between header and message. This is wrong. Fix this by removing the
> helper structure and open code the message generation.

Patches applied

      parent reply	other threads:[~2021-06-23  7:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22  7:49 [PATCH v1 0/2] Fix -Werror=array-bounds errors Daniel Wagner
2021-06-22  7:49 ` [PATCH v1 1/2] rtnl: Fix netlink message alignment Daniel Wagner
2021-06-22  7:49 ` [PATCH v1 2/2] vpn-rtnl: " Daniel Wagner
2021-06-23  7:38 ` Daniel Wagner [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:

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

  git send-email \
    --in-reply-to=20210623073859.lzf4xrhilu3maewi@beryllium.lan \ \ \

* 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).