diff options
author | hs son <shspink2@gmail.com> | 2022-11-15 01:15:41 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-14 18:15:41 +0200 |
commit | c57a2ce871dd67288f6339b2cc92a2fd3421ad50 (patch) | |
tree | 8ac548aa13cc6df2687878fe36dd195ea2111363 /args.go | |
parent | Request.SetTimeout (#1415) (diff) | |
download | fasthttp-c57a2ce871dd67288f6339b2cc92a2fd3421ad50.tar.gz fasthttp-c57a2ce871dd67288f6339b2cc92a2fd3421ad50.tar.bz2 fasthttp-c57a2ce871dd67288f6339b2cc92a2fd3421ad50.zip |
Make sure nothing is nil in tmp slice (#1423)
Diffstat (limited to 'args.go')
-rw-r--r-- | args.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -371,9 +371,10 @@ func visitArgsKey(args []argsKV, f func(k []byte)) { func copyArgs(dst, src []argsKV) []argsKV { if cap(dst) < len(src) { tmp := make([]argsKV, len(src)) + dstLen := len(dst) dst = dst[:cap(dst)] // copy all of dst. copy(tmp, dst) - for i := len(dst); i < len(tmp); i++ { + for i := dstLen; i < len(tmp); i++ { // Make sure nothing is nil. tmp[i].key = []byte{} tmp[i].value = []byte{} |