Skip to content

Commit

Permalink
Fix null ptr deref in tf.raw_ops.RaggedTensorToTensor
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 384257511
Change-Id: I0484ad285039d132d6c41b284a7fcdd2b774a38e
  • Loading branch information
pak-laura authored and tensorflower-gardener committed Jul 12, 2021
1 parent e787d20 commit 301ae88
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tensorflow/core/kernels/ragged_tensor_to_tensor_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,9 @@ class RaggedTensorToTensorBaseOp : public OpKernel {
Status GetFirstDimensionSize(OpKernelContext* context, INDEX_TYPE* result) {
const Tensor first_partition_tensor =
context->input(kFirstPartitionInputIndex);
if (row_partition_types_.empty()) {
return errors::InvalidArgument("No row_partition_types given.");
}
const RowPartitionType first_partition_type = row_partition_types_[0];
switch (first_partition_type) {
case RowPartitionType::FIRST_DIM_SIZE:
Expand Down

0 comments on commit 301ae88

Please sign in to comment.