diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-07-16 10:45:49 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-07-16 10:59:49 +0200 |
commit | f688c161fb9c3f8fc59310fdbe8d4b6421d47664 (patch) | |
tree | 73c8433840ba64313d3d7b4070bbbf9164fd5aab /vendor/golang.org/x/text/transform | |
parent | 9efeb1cf290509caa4b0e3c206fe72d194d76a1e (diff) | |
download | podman-f688c161fb9c3f8fc59310fdbe8d4b6421d47664.tar.gz podman-f688c161fb9c3f8fc59310fdbe8d4b6421d47664.tar.bz2 podman-f688c161fb9c3f8fc59310fdbe8d4b6421d47664.zip |
vendor golang.org/x/text@v0.3.3
Fixes: CVE-2020-14040
Fixes: bugzilla.redhat.com/show_bug.cgi?id=1854718
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor/golang.org/x/text/transform')
-rw-r--r-- | vendor/golang.org/x/text/transform/transform.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vendor/golang.org/x/text/transform/transform.go b/vendor/golang.org/x/text/transform/transform.go index 520b9ada0..48ec64b40 100644 --- a/vendor/golang.org/x/text/transform/transform.go +++ b/vendor/golang.org/x/text/transform/transform.go @@ -648,7 +648,8 @@ func String(t Transformer, s string) (result string, n int, err error) { // Transform the remaining input, growing dst and src buffers as necessary. for { n := copy(src, s[pSrc:]) - nDst, nSrc, err := t.Transform(dst[pDst:], src[:n], pSrc+n == len(s)) + atEOF := pSrc+n == len(s) + nDst, nSrc, err := t.Transform(dst[pDst:], src[:n], atEOF) pDst += nDst pSrc += nSrc @@ -659,6 +660,9 @@ func String(t Transformer, s string) (result string, n int, err error) { dst = grow(dst, pDst) } } else if err == ErrShortSrc { + if atEOF { + return string(dst[:pDst]), pSrc, err + } if nSrc == 0 { src = grow(src, 0) } |