Merge two enforces into one.

This commit is contained in:
Kevin Backhouse 2019-05-14 09:58:42 +01:00 committed by Luis Díaz Más
parent d3e69f6d2c
commit 43f154f44b

View File

@ -668,8 +668,7 @@ namespace Exiv2 {
}
long length = (long) atol(startOfLength);
enforce(length >= 0, Exiv2::kerCorruptedMetadata);
enforce(length <= (eot - sp)/2, Exiv2::kerCorruptedMetadata);
enforce(0 <= length && length <= (eot - sp)/2, Exiv2::kerCorruptedMetadata);
// Allocate space
if (length == 0)