]> Cypherpunks repositories - gostls13.git/commit
internal/zstd: avoid panic when windowSize is negative
authoraimuz <mr.imuz@gmail.com>
Sat, 18 Nov 2023 04:16:04 +0000 (04:16 +0000)
committerM Zhuo <mengzhuo1203@gmail.com>
Tue, 30 Jan 2024 04:10:45 +0000 (04:10 +0000)
commit923ab13f9bb6fccc362d5259e2f456abbeda0c51
tree88939684915b5a0cf44043b45556b412210f9fb8
parent4afb155cdf5cd6e8b133174d3369c4db4ea23c77
internal/zstd: avoid panic when windowSize is negative

This change fixes an edge case in the zstd decompressor where
an int conversion could result in a negative window size.

Fixes #63979
For #62513

Change-Id: Ie714bf8fb51fa509b310deb8bd2c96bd87b52852
GitHub-Last-Rev: ab0be6578247da896f16d85e102b81994b8ee5c4
GitHub-Pull-Request: golang/go#63980
Reviewed-on: https://go-review.googlesource.com/c/go/+/540415
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: M Zhuo <mengzhuo1203@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: M Zhuo <mengzhuo1203@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/internal/zstd/fuzz_test.go
src/internal/zstd/zstd.go