Browse Source

Change while condition to: offset < this.Data.Length - 4

Co-authored-by: Günther Foidl <gue@korporal.at>
pull/1944/head
Brian Popow 4 years ago
committed by GitHub
parent
commit
02cc77360d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/ImageSharp/Metadata/Profiles/IPTC/IptcProfile.cs

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

@ -291,7 +291,7 @@ namespace SixLabors.ImageSharp.Metadata.Profiles.Iptc
}
int offset = 0;
while (offset + 4 < this.Data.Length)
while (offset < this.Data.Length - 4)
{
bool isValidTagMarker = this.Data[offset++] == IptcTagMarkerByte;
byte recordNumber = this.Data[offset++];

Loading…
Cancel
Save