* [nftables PATCH v2] src: rule: fix crash in set listing
@ 2014-04-08 8:19 Ana Rey
2014-04-08 8:30 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Ana Rey @ 2014-04-08 8:19 UTC (permalink / raw)
To: netfilter-devel; +Cc: Ana Rey
It fixes an invalid read that is shown by valgrind.
==3962== Invalid read of size 4
==3962== at 0x407040: do_command (rule.c:692)
==3962== by 0x40588C: nft_run (main.c:183)
==3962== by 0x405469: main (main.c:334)
==3962== Address 0x10 is not stack'd, malloc'd or (recently) free'd
Signed-off-by: Ana Rey <anarey@gmail.com>
---
[Changes in v2]
* I fix description and subject in this patch.
src/rule.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rule.c b/src/rule.c
index 00dedf5..18ae6b1 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -674,7 +674,7 @@ static int do_command_list(struct netlink_ctx *ctx, struct cmd *cmd)
return -1;
set_print(set);
}
- break;
+ return 0;
case CMD_OBJ_SET:
if (netlink_get_set(ctx, &cmd->handle, &cmd->location) < 0)
return -1;
--
1.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-08 8:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-08 8:19 [nftables PATCH v2] src: rule: fix crash in set listing Ana Rey
2014-04-08 8:30 ` Pablo Neira Ayuso
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).