From 7615a3ab8d306359326702109aee0a2facb98b25 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sat, 15 Aug 2020 15:11:28 +0300 Subject: [PATCH] vendor: upgrade github.com/valyala/gozstd from v1.7.1 to v1.8.3 --- go.mod | 4 +--- go.sum | 4 ++-- vendor/github.com/valyala/gozstd/.travis.yml | 2 +- vendor/github.com/valyala/gozstd/gozstd.go | 2 +- vendor/modules.txt | 2 +- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index a44877800..94e70d5df 100644 --- a/go.mod +++ b/go.mod @@ -17,9 +17,7 @@ require ( github.com/valyala/fastjson v1.5.4 github.com/valyala/fastrand v1.0.0 github.com/valyala/fasttemplate v1.2.1 - - // Do not upgrade gozstd version until https://github.com/facebook/zstd/issues/2222 is fixed - github.com/valyala/gozstd v1.7.1 + github.com/valyala/gozstd v1.8.3 github.com/valyala/histogram v1.1.2 github.com/valyala/quicktemplate v1.6.2 golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc // indirect diff --git a/go.sum b/go.sum index 4c5f449ec..106699234 100644 --- a/go.sum +++ b/go.sum @@ -172,8 +172,8 @@ github.com/valyala/fastrand v1.0.0 h1:LUKT9aKer2dVQNUi3waewTbKV+7H17kvWFNKs2Obdk github.com/valyala/fastrand v1.0.0/go.mod h1:HWqCzkrkg6QXT8V2EXWvXCoow7vLwOFN002oeRzjapQ= github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/gozstd v1.7.1 h1:2zWgJWU1859UbFoUnheDXnIK35MjPjFmMFhQYFz8brA= -github.com/valyala/gozstd v1.7.1/go.mod h1:y5Ew47GLlP37EkTB+B4s7r6A5rdaeB7ftbl9zoYiIPQ= +github.com/valyala/gozstd v1.8.3 h1:nHlS+sCFoNLsZpRPKDviXkhHybaRSUjH2w0P/myYo0I= +github.com/valyala/gozstd v1.8.3/go.mod h1:y5Ew47GLlP37EkTB+B4s7r6A5rdaeB7ftbl9zoYiIPQ= github.com/valyala/histogram v1.1.2 h1:vOk5VrGjMBIoPR5k6wA8vBaC8toeJ8XO0yfRjFEc1h8= github.com/valyala/histogram v1.1.2/go.mod h1:CZAr6gK9dbD7hYx2s8WSPh0p5x5wETjC+2b3PJVtEdg= github.com/valyala/quicktemplate v1.6.2 h1:k0vgK7zlmFzqAoIBIOrhrfmZ6JoTGJlLRPLbkPGr2/M= diff --git a/vendor/github.com/valyala/gozstd/.travis.yml b/vendor/github.com/valyala/gozstd/.travis.yml index a7419f6b9..b1d0fa5d6 100644 --- a/vendor/github.com/valyala/gozstd/.travis.yml +++ b/vendor/github.com/valyala/gozstd/.travis.yml @@ -6,7 +6,7 @@ os: - freebsd go: - - 1.12 + - 1.14 script: # build test for supported platforms diff --git a/vendor/github.com/valyala/gozstd/gozstd.go b/vendor/github.com/valyala/gozstd/gozstd.go index f73da78e6..456d74460 100644 --- a/vendor/github.com/valyala/gozstd/gozstd.go +++ b/vendor/github.com/valyala/gozstd/gozstd.go @@ -242,7 +242,7 @@ func decompress(dctx, dctxDict *dctxWrapper, dst, src []byte, dd *DDict) ([]byte } dstLen := len(dst) - if cap(dst) > dstLen { + if cap(dst)-dstLen >= len(src) { // Fast path - try decompressing without dst resize. result := decompressInternal(dctx, dctxDict, dst[dstLen:cap(dst)], src, dd) decompressedSize := int(result) diff --git a/vendor/modules.txt b/vendor/modules.txt index cf00e03c6..5519210ff 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -106,7 +106,7 @@ github.com/valyala/fastjson/fastfloat github.com/valyala/fastrand # github.com/valyala/fasttemplate v1.2.1 github.com/valyala/fasttemplate -# github.com/valyala/gozstd v1.7.1 +# github.com/valyala/gozstd v1.8.3 github.com/valyala/gozstd # github.com/valyala/histogram v1.1.2 github.com/valyala/histogram