#797: Truncate entries with an out-of-bounds upper boundary, rather than trying to adjust their size.

v0.27.3
Andreas Huggel 14 years ago
parent 1c32314c10
commit a558a1d066

@ -1523,10 +1523,9 @@ namespace Exiv2 {
<< ", exceeds buffer size by " << ", exceeds buffer size by "
// cast to make MSVC happy // cast to make MSVC happy
<< static_cast<uint32_t>(pData + size - pLast_) << static_cast<uint32_t>(pData + size - pLast_)
<< " Bytes; adjusting the size\n"; << " Bytes; truncating the entry\n";
#endif #endif
size = static_cast<uint32_t>(pLast_ - pData); size = 0;
// Todo: adjust count, make size a multiple of typeSize
} }
} }
Value::AutoPtr v = Value::create(typeId); Value::AutoPtr v = Value::create(typeId);

Loading…
Cancel
Save