summaryrefslogtreecommitdiff
path: root/vendor/github.com/klauspost/compress/s2/decode_other.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-03-30 22:39:55 +0100
committerLibravatar GitHub <noreply@github.com>2023-03-30 22:39:55 +0100
commita5c920a50b3fe92fa7fa091347cfae729cd681c4 (patch)
tree850fdb1456e2c97c7bd81ed1b19731b836851f25 /vendor/github.com/klauspost/compress/s2/decode_other.go
parent[frontend] Settings navigation design (#1652) (diff)
downloadgotosocial-a5c920a50b3fe92fa7fa091347cfae729cd681c4.tar.xz
bump go-store version (includes minio) (#1657)
Signed-off-by: kim <grufwub@gmail.com>
Diffstat (limited to 'vendor/github.com/klauspost/compress/s2/decode_other.go')
-rw-r--r--vendor/github.com/klauspost/compress/s2/decode_other.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/vendor/github.com/klauspost/compress/s2/decode_other.go b/vendor/github.com/klauspost/compress/s2/decode_other.go
index 11300c3a8..2cb55c2c7 100644
--- a/vendor/github.com/klauspost/compress/s2/decode_other.go
+++ b/vendor/github.com/klauspost/compress/s2/decode_other.go
@@ -57,6 +57,9 @@ func s2Decode(dst, src []byte) int {
}
length = int(x) + 1
if length > len(dst)-d || length > len(src)-s || (strconv.IntSize == 32 && length <= 0) {
+ if debug {
+ fmt.Println("corrupt: lit size", length)
+ }
return decodeErrCodeCorrupt
}
if debug {
@@ -109,6 +112,10 @@ func s2Decode(dst, src []byte) int {
}
if offset <= 0 || d < offset || length > len(dst)-d {
+ if debug {
+ fmt.Println("corrupt: match, length", length, "offset:", offset, "dst avail:", len(dst)-d, "dst pos:", d)
+ }
+
return decodeErrCodeCorrupt
}
@@ -175,6 +182,9 @@ func s2Decode(dst, src []byte) int {
}
length = int(x) + 1
if length > len(dst)-d || length > len(src)-s || (strconv.IntSize == 32 && length <= 0) {
+ if debug {
+ fmt.Println("corrupt: lit size", length)
+ }
return decodeErrCodeCorrupt
}
if debug {
@@ -241,6 +251,9 @@ func s2Decode(dst, src []byte) int {
}
if offset <= 0 || d < offset || length > len(dst)-d {
+ if debug {
+ fmt.Println("corrupt: match, length", length, "offset:", offset, "dst avail:", len(dst)-d, "dst pos:", d)
+ }
return decodeErrCodeCorrupt
}