Fixed ASAN false positive.

Change-Id: I79d9b2cddc61df5919bc4a93627fba2aa69e5d49
Tested: on Linux.
parent 06d3229d
......@@ -135,9 +135,8 @@ inline CheckedError atot(const char *s, Parser &parser, T *val) {
int64_t i = StringToInt(s);
const int64_t min = flatbuffers::numeric_limits<T>::min();
const int64_t max = flatbuffers::numeric_limits<T>::max();
ECHECK(parser.CheckInRange(i, min, max));
*val = (T)i;
return NoError();
*val = (T)i; // Assign this first to make ASAN happy.
return parser.CheckInRange(i, min, max);
}
template<>
inline CheckedError atot<uint64_t>(const char *s, Parser &parser,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment