]> Kevux Git Server - fll/commitdiff
Bugfix: remove invalid counter code from firewall
authorKevin Day <kevin@kevux.org>
Tue, 3 Apr 2012 02:58:17 +0000 (21:58 -0500)
committerKevin Day <kevin@kevux.org>
Tue, 3 Apr 2012 02:58:17 +0000 (21:58 -0500)
The counter2 was being used when it should not have been.

level_3/firewall/c/firewall.c

index 87e723a6f0b9d6026538c303b4fb4dd0294ee620..b95581809dc2981aa46b256fa1295caf81b29c88 100644 (file)
@@ -696,8 +696,8 @@ extern "C"{
                         f_string_length max_size  = 0;
                         f_bool          new_chain = f_true;
 
-                        counter2 = data->objects.array[data->custom.array[counter2]].start;
-                        max_size = data->objects.array[data->custom.array[counter2]].stop - data->objects.array[data->custom.array[counter2]].start + 1;
+                        counter2 = input.start;
+                        max_size = input.stop - input.start + 1;
 
                         if (max_size >= custom_chain.size) {
                           f_resize_dynamic_string(status, custom_chain, max_size + firewall_default_allocation_step);