Skip to content
Permalink
Browse files Browse the repository at this point in the history
Prevent array OOB read/write
PiperOrigin-RevId: 371026165
Change-Id: I26ac6372c87246e03c7eb8c94e84c84d86054b36
  • Loading branch information
mihaimaruseac authored and tensorflower-gardener committed Apr 29, 2021
1 parent c59c37e commit ae2daeb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tensorflow/lite/kernels/split_v.cc
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 ae2daeb

Please sign in to comment.