Avoid null pointer deref.
This commit is contained in:
Kevin Backhouse 2022-10-22 15:55:02 +01:00
parent baf1969ec7
commit 6bb956ad80
No known key found for this signature in database
GPG Key ID: 9DD01852EE40366E

View File

@ -834,6 +834,7 @@ void QuickTimeVideo::userDataDecoder(size_t size_external) {
}
else if (equalsQTimeTag(buf, "CMbo") || equalsQTimeTag(buf, "Cmbo")) {
enforce(tv, Exiv2::ErrorCode::kerCorruptedMetadata);
io_->readOrThrow(buf.data(), 2);
buf.data()[2] = '\0';
tv_internal = find(cameraByteOrderTags, Exiv2::toString(buf.data()));