#534: Prevent integer overflow.

v0.27.3
Andreas Huggel 18 years ago
parent 3c17cb4dec
commit 4b95b20db8

@ -489,7 +489,7 @@ namespace Exiv2 {
io_->seek(16 - bufRead, BasicIo::cur); io_->seek(16 - bufRead, BasicIo::cur);
psData.alloc(size - 16); psData.alloc(size - 16);
// Load PS data now to allow reinsertion at any point // Load PS data now to allow reinsertion at any point
io_->read(psData.pData_, psData.size_); io_->read(psData.pData_, size - 16);
if (io_->error() || io_->eof()) throw Error(20); if (io_->error() || io_->eof()) throw Error(20);
} }
else if (marker == com_ && skipCom == -1) { else if (marker == com_ && skipCom == -1) {

Loading…
Cancel
Save