diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-11-18 16:22:43 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-11-18 16:24:06 +0100 |
commit | 55cc5a146d72b4f20d654d87d246caffbd783c20 (patch) | |
tree | 92fd25dc895b337052aac1e0a678bb6166b931c6 /unoidl | |
parent | 6ac6acd2a902a2cd2b64458b24b803993ebecb75 (diff) |
Avoid overflow
Change-Id: I4afe86dc29788a7b2d2d9c438f182726f80b1cbd
Diffstat (limited to 'unoidl')
-rw-r--r-- | unoidl/source/unoidlprovider.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unoidl/source/unoidlprovider.cxx b/unoidl/source/unoidlprovider.cxx index 68d5ebc5b868..dc42fa122a37 100644 --- a/unoidl/source/unoidlprovider.cxx +++ b/unoidl/source/unoidlprovider.cxx @@ -1186,7 +1186,7 @@ UnoidlProvider::UnoidlProvider(OUString const & uri): file_(new MappedFile(uri)) } sal_uInt32 off = file_->read32(8); mapSize_ = file_->read32(12); - if (off + 8 * mapSize_ > file_->size) { //TODO: overflow + if (off + 8 * sal_uInt64(mapSize_) > file_->size) { // cannot overflow throw FileFormatException( file_->uri, "UNOIDL format: root map offset + size too large"); } |