From: Rusty Russell Date: Tue, 19 Sep 2000 07:01:46 +0000 (+0000) Subject: Fix allocation (base new alloc on current size, not original size). X-Git-Tag: v1.2.1~90 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3c7a6c479f3eccd65a78dc103f33f4085e8e4703;p=thirdparty%2Fiptables.git Fix allocation (base new alloc on current size, not original size). --- diff --git a/libiptc/libiptc.c b/libiptc/libiptc.c index 55edbc65..a0f12e6b 100644 --- a/libiptc/libiptc.c +++ b/libiptc/libiptc.c @@ -730,7 +730,7 @@ insert_rules(unsigned int num_rules, unsigned int rules_size, } newh = alloc_handle((*handle)->info.name, - (*handle)->info.size + rules_size, + (*handle)->entries.size + rules_size, (*handle)->info.num_entries + num_rules); if (!newh) return 0;