]> Kevux Git Server - fll/commitdiff
Security: Invalid read when processing not condition minimum value.
authorKevin Day <thekevinday@gmail.com>
Wed, 20 Jul 2022 02:16:47 +0000 (21:16 -0500)
committerKevin Day <thekevinday@gmail.com>
Wed, 20 Jul 2022 02:49:07 +0000 (21:49 -0500)
The right side of the or condition should only perform the minimum check when j is within the range of the array.

level_3/fake/c/private-make-operate_validate.c

index e16943f871f3014ea395bdc3e9465878d9325c4e..8bf7422dd676b55f42a554c10f6509a30f0ad470 100644 (file)
@@ -818,7 +818,7 @@ extern "C" {
           j = 7;
         }
 
-        if (j == 7 && data_make->cache_arguments.used >= if_type_minimum[i] || data_make->cache_arguments.used >= if_not_type_minimum[j]) {
+        if (j == 7 && data_make->cache_arguments.used >= if_type_minimum[i] || j < 7 && data_make->cache_arguments.used >= if_not_type_minimum[j]) {
           if (state_process->condition == fake_make_operation_if_type_if_success_e || state_process->condition == fake_make_operation_if_type_if_failure_e) {
 
             // The success and failure operations minimum is also the maximum.