Bug #797 » tiff_composite_assertion_fix.diff
src/tiffcomposite.cpp (working copy) | ||
---|---|---|
1046 | 1046 | |
1047 | 1047 |
TypeId typeId = toTypeId(tiffType(), tag(), group()); |
1048 | 1048 |
long typeSize = TypeInfo::typeSize(typeId); |
1049 |
assert(typeSize != 0); |
|
1049 | ||
1050 |
// If this isn't valid, force it to a safe value, since |
|
1051 |
// some (possibly) malformed JPEGs can cause this to be 0 |
|
1052 |
if (typeSize < 1) typeSize = 1; |
|
1053 | ||
1050 | 1054 |
return static_cast<uint32_t>(static_cast<double>(size()) / typeSize + 0.5); |
1051 | 1055 |
} |
1052 | 1056 |
- « Previous
- 1
- 2
- Next »