From 63e8f2d0c1b294d6740b83064b8943e2e787a629 Mon Sep 17 00:00:00 2001 From: Johannes Bildstein Date: Fri, 24 Mar 2017 21:06:04 +0100 Subject: [PATCH] wrong length written (off by one) --- .../Profiles/ICC/DataWriter/IccDataWriter.TagDataEntry.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.TagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.TagDataEntry.cs index 06be71276..db5e818b0 100644 --- a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.TagDataEntry.cs +++ b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.TagDataEntry.cs @@ -903,7 +903,7 @@ namespace ImageSharp count += size = this.WriteAsciiString(value.ScriptCode, 67, true); this.dataStream.Position -= size + 3; count += this.WriteUInt16(value.ScriptCodeCode); - count += this.WriteByte((byte)(value.ScriptCode.Length > 66 ? 67 : value.ScriptCode.Length)); + count += this.WriteByte((byte)(value.ScriptCode.Length > 66 ? 67 : value.ScriptCode.Length + 1)); this.dataStream.Position += size; }