We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f21a7f commit 5f6febaCopy full SHA for 5f6feba
Firestore/core/src/local/leveldb_persistence.cc
@@ -196,7 +196,9 @@ StatusOr<int64_t> LevelDbPersistence::CalculateByteSize() {
196
int64_t file_size = maybe_size.ValueOrDie();
197
count += file_size;
198
199
- if (count < old_count || count > std::numeric_limits<int64_t>::max()) {
+ auto max_signed_value =
200
+ static_cast<uint64_t>(std::numeric_limits<int64_t>::max());
201
+ if (count < old_count || count > max_signed_value) {
202
return Status(Error::kErrorOutOfRange,
203
"Failed to size LevelDB: count overflowed");
204
}
0 commit comments