path: root/src/object.c
diff options
authorPablo Neira Ayuso <>2017-12-28 19:17:34 +0100
committerPablo Neira Ayuso <>2017-12-28 19:42:38 +0100
commitfb998eccee2030aabe249b1e7515050399e0304b (patch)
treed8397c78a214ffaa9f1d277c833d2492fd2fbff3 /src/object.c
parent57f85977ed72ee3d623bbc2391d503f8a7e72c5d (diff)
data_reg: calm down compilation warning in nftnl_data_reg_value_json_parse()
expr/data_reg.c: In function 'nftnl_data_reg_json_parse': expr/data_reg.c:69:27: warning: '%d' directive writing between 1 and 10 bytes into a region of size 2 [-Wformat-overflow=] sprintf(node_name, "data%d", i); ^~ expr/data_reg.c:69:22: note: directive argument in the range [0, 2147483647] sprintf(node_name, "data%d", i); Buffer overflow is triggerable when reg->len > 396, but len never goes over 128 due to type validation just a bit before. Use snprintf() and make sure buffer is large enough to store the "data256" string. Reported-by: Jan Engelhardt <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'src/object.c')
0 files changed, 0 insertions, 0 deletions