Skip to content

Commit 42a512f

Browse files
committed
Honour byte buffer view bounds
1 parent 53e5f6e commit 42a512f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/CRC32CNIOSupport/ByteBuffer+CRC.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ extension ByteBuffer {
77
return ~0
88
}
99
var crc = CRC32C()
10-
crc.update(view)
10+
11+
crc.update(view[view.startIndex..<view.endIndex])
1112
crc.finalize()
1213
return crc.value
1314
}

0 commit comments

Comments
 (0)