Browse Source

Break reading iptc data when Extended data set tag is encountered

pull/1944/head
Brian Popow 4 years ago
parent
commit
559feb26df
  1. 5
      src/ImageSharp/Metadata/Profiles/IPTC/IptcProfile.cs

5
src/ImageSharp/Metadata/Profiles/IPTC/IptcProfile.cs

@ -282,6 +282,11 @@ namespace SixLabors.ImageSharp.Metadata.Profiles.Iptc
uint byteCount = BinaryPrimitives.ReadUInt16BigEndian(this.Data.AsSpan(offset, 2));
offset += 2;
if (byteCount > MaxStandardDataTagSize)
{
// Extended data set tag's are not supported.
break;
}
if (isValidTagMarker && byteCount > 0 && (offset + byteCount <= this.Data.Length))
{

Loading…
Cancel
Save