]> git.ipfire.org Git - thirdparty/nftables.git/commit
src: don't write to possible rodata location
authorFlorian Westphal <fw@strlen.de>
Mon, 4 May 2026 11:59:02 +0000 (13:59 +0200)
committerFlorian Westphal <fw@strlen.de>
Thu, 7 May 2026 22:07:04 +0000 (00:07 +0200)
commit6e6a668d201dd311bb0ca0fac7a83e853abb5293
tree6bacf6b3cb7964eee1f6f64fa14c9861fa1c0435
parent2c5c56515c33444c2ef4ed831b7861452392cdd3
src: don't write to possible rodata location

seen with gcc-16.0.1:
src/libnftables.c: In function 'nft_ctx_add_var':
src/libnftables.c:153:27: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
153 |         char *separator = strchr(var, '=');

function arg says "const char *", write to this memory is not expected.

Signed-off-by: Florian Westphal <fw@strlen.de>
src/libnftables.c