From d906c963269dd1522c7693c8f944e6a846b86221 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Thu, 3 Aug 2017 15:34:26 -0700 Subject: Fix signed integer overflows detected with -fsanitize=signed-integer-overflow PiperOrigin-RevId: 164193035 --- tensorflow/core/lib/strings/numbers.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tensorflow/core/lib/strings/numbers.cc') diff --git a/tensorflow/core/lib/strings/numbers.cc b/tensorflow/core/lib/strings/numbers.cc index 0dea0f89f9..3c85737702 100644 --- a/tensorflow/core/lib/strings/numbers.cc +++ b/tensorflow/core/lib/strings/numbers.cc @@ -234,7 +234,7 @@ bool safe_strtou64(StringPiece str, uint64* value) { SkipSpaces(&str); if (!isdigit(SafeFirstChar(str))) return false; - int64 result = 0; + uint64 result = 0; do { int digit = SafeFirstChar(str) - '0'; if ((kuint64max - digit) / 10 < result) { -- cgit v1.2.3