From: Pablo Neira Ayuso <pablo@netfilter.org>
To: "Daniel Gröber" <dxld@darkboxed.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [libnf_ct resend PATCH 5/8] Add asizeof() macro
Date: Wed, 24 Jun 2020 12:55:26 +0200 [thread overview]
Message-ID: <20200624105526.GA20575@salvia> (raw)
In-Reply-To: <20200623123403.31676-6-dxld@darkboxed.org>
On Tue, Jun 23, 2020 at 02:34:00PM +0200, Daniel Gröber wrote:
> Signed-off-by: Daniel Gröber <dxld@darkboxed.org>
> ---
> include/internal/internal.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/internal/internal.h b/include/internal/internal.h
> index 859724b..68c5ef0 100644
> --- a/include/internal/internal.h
> +++ b/include/internal/internal.h
> @@ -40,6 +40,8 @@
> #define IPPROTO_DCCP 33
> #endif
>
> +#define asizeof(x) (sizeof(x) / sizeof(*x))
Please call this ARRAY_SIZE.
Thanks.
next prev parent reply other threads:[~2020-06-24 10:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 12:33 Various memory-safety related fixes Daniel Gröber
2020-06-23 12:33 ` [libnf_ct resend PATCH 1/8] Handle negative snprintf return values properly Daniel Gröber
2020-06-24 10:45 ` Pablo Neira Ayuso
2020-06-23 12:33 ` [libnf_ct resend PATCH 2/8] Fix nfexp_snprintf return value docs Daniel Gröber
2020-06-23 12:33 ` [libnf_ct resend PATCH 3/8] Replace strncpy with snprintf to improve null byte handling Daniel Gröber
2020-06-23 12:33 ` [libnf_ct resend PATCH 4/8] Fix incorrect snprintf size calculation Daniel Gröber
2020-06-23 12:34 ` [libnf_ct resend PATCH 5/8] Add asizeof() macro Daniel Gröber
2020-06-24 10:55 ` Pablo Neira Ayuso [this message]
2020-06-23 12:34 ` [libnf_ct resend PATCH 6/8] Fix buffer overflow on invalid icmp type in setters Daniel Gröber
2020-06-24 10:58 ` Pablo Neira Ayuso
2020-06-23 12:34 ` [libnf_ct resend PATCH 7/8] Fix buffer overflow in protocol related snprintf functions Daniel Gröber
2020-06-23 12:34 ` [libnf_ct resend PATCH 8/8] Fix buffer overflows in __snprintf_protoinfo* like in *2str fns Daniel Gröber
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=20200624105526.GA20575@salvia \
--to=pablo@netfilter.org \
--cc=dxld@darkboxed.org \
--cc=netfilter-devel@vger.kernel.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).