1
0
Fork 0

fix buffer overflow (#8187)

This commit is contained in:
Frank Celler 2019-02-22 11:21:02 +01:00 committed by GitHub
parent 8ce55e548f
commit 7c091c57d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -966,8 +966,11 @@ uint64_t WinEnvIO::NowNanos() {
QueryPerformanceCounter(&li);
// Convert to nanoseconds first to avoid loss of precision
// and divide by frequency
li.QuadPart *= std::nano::den;
li.QuadPart /= perf_counter_frequency_;
if (perf_counter_frequency_ < std::nano::den) {
li.QuadPart *= (std::nano::den / perf_counter_frequency_);
} else {
li.QuadPart /= (perf_counter_frequency_ / std::nano::den);
} // else
return li.QuadPart;
}

View File

@ -1,6 +1,8 @@
v3.4.4 (XXXX-XX-XX)
V3.4.4 (2019-XX-XX)
-------------------
* fixed overflow in windows NowNanos in RocksDB
* fixed issue #8165: AQL optimizer does not pick up multiple Geo index
* when creating a new database with an initial user, set the database permission