]> git.ipfire.org Git - thirdparty/nftables.git/commit
src: parser_json: fix format string bugs
authorFlorian Westphal <fw@strlen.de>
Thu, 23 Oct 2025 12:17:00 +0000 (14:17 +0200)
committerFlorian Westphal <fw@strlen.de>
Thu, 23 Oct 2025 12:54:05 +0000 (14:54 +0200)
commitb30ad0c25b7b4a289dd73e8da6fa101b66fbf0d7
tree6f4dc5623ce03a4227d37a2001c6a19a7440999e
parentbc330914780345616edde25329e3c866ec279b42
src: parser_json: fix format string bugs

After adding fmt attribute annotation:
warning: format not a string literal and no format arguments [-Wformat-security]
  131 |         erec_queue(error(&loc, err->text), ctx->msgs);
In function 'json_events_cb':
warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type '__u32' {aka 'unsigned int'} [-Wformat=]

Fix that up too.

Fixes: 586ad210368b ("libnftables: Implement JSON parser")
Signed-off-by: Florian Westphal <fw@strlen.de>
src/parser_json.c