OcXmlLib: Fix potential buffer overflow when deserializing mdata

This commit is contained in:
vit9696 2019-04-07 21:30:04 +03:00
parent fe93ca4186
commit 68b53e136c

View File

@ -1574,6 +1574,8 @@ PlistMetaDataValue (
if (PlistNodeCast (Node, PLIST_NODE_TYPE_DATA) != NULL) {
Content = XmlNodeContent (Node);
if (Content != NULL) {
Length = *Size;
Result = OcBase64Decode (Content, AsciiStrLen (Content), Buffer, &Length);
if (!RETURN_ERROR (Result) && (UINT32) Length == Length) {