Merge "Fix integer overflow in make_timestamp_ns_locked" into qt-qpr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
1d20f2096c
@@ -664,7 +664,7 @@ int64_t WorkDirectory::make_timestamp_ns_locked() {
|
|||||||
nanosleep(&spec, nullptr);
|
nanosleep(&spec, nullptr);
|
||||||
}
|
}
|
||||||
clock_gettime(CLOCK_REALTIME, &spec);
|
clock_gettime(CLOCK_REALTIME, &spec);
|
||||||
timestampNs = (spec.tv_sec) * 1000 + spec.tv_nsec;
|
timestampNs = int64_t(spec.tv_sec) * 1000 + spec.tv_nsec;
|
||||||
} while (file_exists_locked(timestampNs));
|
} while (file_exists_locked(timestampNs));
|
||||||
return timestampNs;
|
return timestampNs;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user