diff --git a/iptables/tests/shell/testcases/ipt-restore/0010-noflush-new-chain_0 b/iptables/tests/shell/testcases/ipt-restore/0010-noflush-new-chain_0 new file mode 100755 index 0000000..739e684 --- /dev/null +++ b/iptables/tests/shell/testcases/ipt-restore/0010-noflush-new-chain_0 @@ -0,0 +1,10 @@ +#!/bin/sh -e + +# assert input feed from buffer doesn't trip over +# added nul-chars from parsing chain line. + +$XT_MULTI iptables-restore --noflush <error.lineno = ++line; DEBUGP("%s: buffered line %d: '%s'\n", __func__, line, ptr); xtables_restore_parse_line(h, p, &state, ptr); - ptr += strlen(ptr) + 1; + ptr += len + 1; } if (*buffer) { h->error.lineno = ++line;