summaryrefslogtreecommitdiff
path: root/vendor/github.com/klauspost/compress/s2/s2.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/klauspost/compress/s2/s2.go')
-rw-r--r--vendor/github.com/klauspost/compress/s2/s2.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/vendor/github.com/klauspost/compress/s2/s2.go b/vendor/github.com/klauspost/compress/s2/s2.go
index dae3f731f..72bcb4945 100644
--- a/vendor/github.com/klauspost/compress/s2/s2.go
+++ b/vendor/github.com/klauspost/compress/s2/s2.go
@@ -37,6 +37,8 @@ package s2
import (
"bytes"
"hash/crc32"
+
+ "github.com/klauspost/compress/internal/race"
)
/*
@@ -112,6 +114,8 @@ var crcTable = crc32.MakeTable(crc32.Castagnoli)
// crc implements the checksum specified in section 3 of
// https://github.com/google/snappy/blob/master/framing_format.txt
func crc(b []byte) uint32 {
+ race.ReadSlice(b)
+
c := crc32.Update(0, crcTable, b)
return c>>15 | c<<17 + 0xa282ead8
}