netfilter: ipset: small potential read beyond the end of buffer
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 10 Nov 2014 16:11:21 +0000 (17:11 +0100)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:06:06 +0000 (13:06 +0000)
commit4c28dc4c24e2a69d74a05fa397d7cf4386aa9c72
tree7af160bda83a945e9341556e43e140faa5a5d58e
parent6eecffe14f9df01ee1356016b16a3b04d5197173
netfilter: ipset: small potential read beyond the end of buffer

commit 2196937e12b1b4ba139806d132647e1651d655df upstream.

We could be reading 8 bytes into a 4 byte buffer here.  It seems
harmless but adding a check is the right thing to do and it silences a
static checker warning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/ipset/ip_set_core.c