Skip to content

Commit

Permalink
Merge pull request #49821 from geetachavan1/cherrypicks_N358P
Browse files Browse the repository at this point in the history
Prevent array OOB read/write
  • Loading branch information
mihaimaruseac committed May 27, 2021
2 parents 3f5af2c + 6cfbe88 commit d8ba32d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tensorflow/lite/kernels/split_v.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ TfLiteStatus ResizeOutputTensors(TfLiteContext* context, TfLiteNode* node,
}
}

TF_LITE_ENSURE(context, axis_value >= 0);
TF_LITE_ENSURE(context, axis_value < NumDimensions(input));
const int input_size = SizeOfDimension(input, axis_value);

if (minus_one_index != -1) {
Expand Down

0 comments on commit d8ba32d

Please sign in to comment.