]> git.ipfire.org Git - thirdparty/ipset.git/commit
Fix possible truncated output in ipset output buffer handling
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Sun, 12 Mar 2017 17:27:45 +0000 (18:27 +0100)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Sun, 12 Mar 2017 17:27:45 +0000 (18:27 +0100)
commita875d3fb4beda43cb54b5810565bafc16a568e5c
treea20a5bd0488625d01d89965ac8ca7e72fa4454a7
parent6dbdb4e2ab4f83d6eccba2283bd8bb4b3cbc447a
Fix possible truncated output in ipset output buffer handling

Omri Bahumi and Yoni Lavi discovered that due to the inproper
handling of the ipset output buffer, the output may be truncated.
So for example in an "ipset save" output, instead of 192.168.0.0/24,
just 192.168.0.0 printed. If one use "ipset save" and then "ipset restore"
to restore the sets, this may lead to wrong firewall rules at the end.

The patch fixes the bug in the ipset code.
lib/print.c
lib/session.c