We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d70e575 commit 44ef6aeCopy full SHA for 44ef6ae
src/xmp.cpp
@@ -765,8 +765,12 @@ namespace Exiv2 {
765
return 2;
766
}
767
768
- XMLValidator::check(xmpPacket.data(), xmpPacket.size());
769
- SXMPMeta meta(xmpPacket.data(), static_cast<XMP_StringLen>(xmpPacket.size()));
+ // Make sure the unterminated substring is used
+ size_t len = xmpPacket.size();
770
+ while (len > 0 && 0 == xmpPacket[len - 1]) --len;
771
+
772
+ XMLValidator::check(xmpPacket.data(), len);
773
+ SXMPMeta meta(xmpPacket.data(), static_cast<XMP_StringLen>(len));
774
SXMPIterator iter(meta);
775
std::string schemaNs, propPath, propValue;
776
XMP_OptionBits opt = 0;
0 commit comments