aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/util/memmapped_file_system_test.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-08-03 15:34:26 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-08-03 15:41:20 -0700
commitd906c963269dd1522c7693c8f944e6a846b86221 (patch)
tree8af37ae96388aa1d2f3c2000b8104cd45e6ac669 /tensorflow/core/util/memmapped_file_system_test.cc
parenta6b2cc4b4c2ae377a06f1fb4119d3f5bc764c337 (diff)
Fix signed integer overflows detected with -fsanitize=signed-integer-overflow
PiperOrigin-RevId: 164193035
Diffstat (limited to 'tensorflow/core/util/memmapped_file_system_test.cc')
-rw-r--r--tensorflow/core/util/memmapped_file_system_test.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/core/util/memmapped_file_system_test.cc b/tensorflow/core/util/memmapped_file_system_test.cc
index a5f24b08b3..616eb5dac3 100644
--- a/tensorflow/core/util/memmapped_file_system_test.cc
+++ b/tensorflow/core/util/memmapped_file_system_test.cc
@@ -52,7 +52,7 @@ Status CreateMemmappedFileSystemFile(const string& filename, bool corrupted,
// Save a tensor after the proto to check that alignment works.
test::FillFn<float>(test_tensor,
- [](int i) { return static_cast<float>(i * i * i); });
+ [](int i) { return static_cast<float>(i) * i * i; });
TF_RETURN_IF_ERROR(writer.SaveTensor(*test_tensor, kTensor2FileName));
if (!corrupted) {