Skip to content

Commit

Permalink
Fix bounds check
Browse files Browse the repository at this point in the history
  • Loading branch information
drewnoakes committed Jan 22, 2024
1 parent 7954af3 commit a86e189
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MetadataExtractor/Formats/Exif/ExifTiffHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ private void ProcessGeoTiff(ushort[] geoKeys, ExifIfd0Directory sourceDirectory)
}
else if (sourceValue is Array sourceArray)
{
if (valueOffset + valueCount < sourceArray.Length)
if (valueOffset + valueCount <= sourceArray.Length)
{
var array = Array.CreateInstance(sourceArray.GetType().GetElementType(), valueCount);
Array.Copy(sourceArray, valueOffset, array, 0, valueCount);
Expand Down

0 comments on commit a86e189

Please sign in to comment.