diff options
author | Jiri Popelka <jpopelka@redhat.com> | 2011-06-10 11:11:00 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2011-06-13 19:53:17 +0200 |
commit | a82107933da41572428b8c882d77c10267cbcef9 (patch) | |
tree | bc53b941b466a683f3bac30a951972580845fa76 /src/libnfnetlink.c | |
parent | ba37f0a01d83d0884a423971b329fb003aa4d196 (diff) |
src: BAD_SIZEOF
static analysis (analysis based only on compiling of sources, not based on running of binary)
of the code revealed the following problem:
libnfnetlink.c:481: Taking the size of pointer parameter "nlh" is suspicious.
libnfnetlink.c:486: Taking the size of pointer parameter "nlh" is suspicious.
Signed-off-by: Jiri Popelka <jpopelka@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/libnfnetlink.c')
-rw-r--r-- | src/libnfnetlink.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libnfnetlink.c b/src/libnfnetlink.c index 6e7afc6..2f962fc 100644 --- a/src/libnfnetlink.c +++ b/src/libnfnetlink.c @@ -477,12 +477,12 @@ nfnl_parse_hdr(const struct nfnl_handle *nfnlh, if (nlh->nlmsg_len == NLMSG_LENGTH(sizeof(struct nfgenmsg))) { if (genmsg) - *genmsg = (void *)nlh + sizeof(nlh); + *genmsg = (void *)nlh + sizeof(*nlh); return NULL; } if (genmsg) - *genmsg = (void *)nlh + sizeof(nlh); + *genmsg = (void *)nlh + sizeof(*nlh); return (void *)nlh + NLMSG_LENGTH(sizeof(struct nfgenmsg)); } |