Skip to content

Commit

Permalink
Merge pull request #51328 from tensorflow/mm-cp-15691e456c7dc9bd6be20…
Browse files Browse the repository at this point in the history
…3b09765b063bf4a380c-on-r2.3

Prevent dereferencing of null pointers in TFLite's `add.cc`.
  • Loading branch information
mihaimaruseac committed Aug 6, 2021
2 parents 5b61a29 + 14f52ca commit 4f49885
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tensorflow/lite/kernels/internal/optimized/optimized_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ inline void BinaryBroadcastFiveFold(const ArithmeticParams& unswitched_params,
// We have broadcast y2*y3*y4 of input2 data y1 times, and now move on.
input2_data_reset = input2_data_ptr;
}
} else {
} else if (input1_data_ptr != nullptr) {
// Special case of y4 == 1, in which the innermost loop is a single
// element and can be combined with the next (y3) as an inner broadcast.
//
Expand Down

0 comments on commit 4f49885

Please sign in to comment.