Blame SOURCES/x-text-infinite-loop.patch

13dae4
diff --git a/src/vendor/golang.org/x/text/transform/transform.go b/src/vendor/golang.org/x/text/transform/transform.go
13dae4
index 520b9ad..48ec64b 100644
13dae4
--- a/src/vendor/golang.org/x/text/transform/transform.go
13dae4
+++ b/src/vendor/golang.org/x/text/transform/transform.go
13dae4
@@ -648,7 +648,8 @@ func String(t Transformer, s string) (result string, n int, err error) {
13dae4
 	// Transform the remaining input, growing dst and src buffers as necessary.
13dae4
 	for {
13dae4
 		n := copy(src, s[pSrc:])
13dae4
-		nDst, nSrc, err := t.Transform(dst[pDst:], src[:n], pSrc+n == len(s))
13dae4
+		atEOF := pSrc+n == len(s)
13dae4
+		nDst, nSrc, err := t.Transform(dst[pDst:], src[:n], atEOF)
13dae4
 		pDst += nDst
13dae4
 		pSrc += nSrc
13dae4
 
13dae4
@@ -659,6 +660,9 @@ func String(t Transformer, s string) (result string, n int, err error) {
13dae4
 				dst = grow(dst, pDst)
13dae4
 			}
13dae4
 		} else if err == ErrShortSrc {
13dae4
+			if atEOF {
13dae4
+				return string(dst[:pDst]), pSrc, err
13dae4
+			}
13dae4
 			if nSrc == 0 {
13dae4
 				src = grow(src, 0)
13dae4
 			}