Kaydet (Commit) 55cc5a14 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Avoid overflow

Change-Id: I4afe86dc29788a7b2d2d9c438f182726f80b1cbd
üst 6ac6acd2
...@@ -1186,7 +1186,7 @@ UnoidlProvider::UnoidlProvider(OUString const & uri): file_(new MappedFile(uri)) ...@@ -1186,7 +1186,7 @@ UnoidlProvider::UnoidlProvider(OUString const & uri): file_(new MappedFile(uri))
} }
sal_uInt32 off = file_->read32(8); sal_uInt32 off = file_->read32(8);
mapSize_ = file_->read32(12); mapSize_ = file_->read32(12);
if (off + 8 * mapSize_ > file_->size) { //TODO: overflow if (off + 8 * sal_uInt64(mapSize_) > file_->size) { // cannot overflow
throw FileFormatException( throw FileFormatException(
file_->uri, "UNOIDL format: root map offset + size too large"); file_->uri, "UNOIDL format: root map offset + size too large");
} }
......
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