Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fix a potential buffer overflow issue in reference kernel of the CONV…
…_3D_TRANSPOSE

PiperOrigin-RevId: 479074072
  • Loading branch information
yishuangP authored and tensorflower-gardener committed Oct 5, 2022
1 parent 5900f2e commit 72c0bdc
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -111,14 +111,13 @@ inline void Conv3DTranspose(
if (bias_data) {
const int outer_size =
batches * output_depth * output_height * output_width;
const int num_channels = input_shape.Dims(4);
for (int n = 0; n < outer_size; ++n) {
for (int c = 0; c < output_num_channels; ++c) {
data_ptr[c] = ActivationFunctionWithMinMax(data_ptr[c] + bias_data[c],
float_activation_min,
float_activation_max);
}
data_ptr += num_channels;
data_ptr += output_num_channels;
}
} else {
const int flat_size = output_shape.FlatSize();
Expand Down

0 comments on commit 72c0bdc

Please sign in to comment.