Permalink
Show file tree
Hide file tree
11 changes: 11 additions & 0 deletions
11
tensorflow/core/kernels/data/sparse_tensor_slice_dataset_op.cc
20 changes: 20 additions & 0 deletions
20
tensorflow/python/data/kernel_tests/from_sparse_tensor_slices_test.py
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Prevent nullptr deref in SparseTensorSliceDataset
The arguments must determine a valid sparse tensor. This means that when indices are empty then the values must be empty too (and the reverse). Also added test, by modifying existing test with empty sparse tensor to now run with an invalid sparse tensor input. PiperOrigin-RevId: 388562757 Change-Id: Id8b54cd7c2316025b4f9a77292c8fb5344d17609
- Loading branch information
1 parent
234a51a
commit 02cc160
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters