Skip to content
Permalink
Browse files Browse the repository at this point in the history
Prevent dereferencing of null pointers in TFLite's add.cc.
PiperOrigin-RevId: 387244946
Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9
  • Loading branch information
mihaimaruseac authored and tensorflower-gardener committed Jul 28, 2021
1 parent c107c1a commit 15691e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tensorflow/lite/kernels/internal/optimized/optimized_ops.h
Expand Up @@ -265,7 +265,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 15691e4

Please sign in to comment.