From 316e88b98a8d97d197fbd536a97c5d808be04c06 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Tue, 19 Jul 2022 21:16:47 -0500 Subject: [PATCH] Security: Invalid read when processing not condition minimum value. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/level_3/fake/c/private-make-operate_validate.c b/level_3/fake/c/private-make-operate_validate.c index e16943f..8bf7422 100644 --- a/level_3/fake/c/private-make-operate_validate.c +++ b/level_3/fake/c/private-make-operate_validate.c @@ -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. -- 1.8.3.1