Skip to content

Commit

Permalink
Merge pull request #49819 from geetachavan1/cherrypicks_PLQ7L
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 c427d9b + 523e7ac commit 2f06eb3
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 @@ -91,6 +91,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 2f06eb3

Please sign in to comment.