Browse Source

Added guard clause of empty exif strings

pull/2088/head
Dmitry Pentin 4 years ago
parent
commit
55d01f231f
  1. 5
      src/ImageSharp/Metadata/Profiles/Exif/ExifEncodedStringHelpers.cs

5
src/ImageSharp/Metadata/Profiles/Exif/ExifEncodedStringHelpers.cs

@ -84,6 +84,11 @@ namespace SixLabors.ImageSharp.Metadata.Profiles.Exif
=> encoding.GetBytes(value.AsSpan(), destination);
#else
{
if (value.Length == 0)
{
return 0;
}
fixed (char* c = value)
{
fixed (byte* b = destination)

Loading…
Cancel
Save