Skip to content

Commit

Permalink
s2: Fix incorrect length encoded by writer.AddSkippableBlock (#917)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jille committed Jan 25, 2024
1 parent 515f153 commit 6ac58c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion s2/writer.go
Expand Up @@ -273,7 +273,7 @@ func (w *Writer) AddSkippableBlock(id uint8, data []byte) (err error) {
return fmt.Errorf("skippable block excessed maximum size")
}
var header [4]byte
chunkLen := 4 + len(data)
chunkLen := len(data)
header[0] = id
header[1] = uint8(chunkLen >> 0)
header[2] = uint8(chunkLen >> 8)
Expand Down

0 comments on commit 6ac58c9

Please sign in to comment.