From 358d35455d06b1ebee948efff123842490dcb797 Mon Sep 17 00:00:00 2001 From: smasher164 Date: Thu, 26 Nov 2020 14:16:33 -0500 Subject: [PATCH] bufio: make string(int) conversion safer Updates #42792. Change-Id: I7e53426c41e5609d9dadceb300f7983ba7ad6577 Reviewed-on: https://go-review.googlesource.com/c/go/+/273526 Run-TryBot: Akhil Indurti TryBot-Result: Go Bot Reviewed-by: Ian Lance Taylor Reviewed-by: Robert Griesemer --- src/bufio/bufio_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bufio/bufio_test.go b/src/bufio/bufio_test.go index 75086f1f24..d7b34bd0d8 100644 --- a/src/bufio/bufio_test.go +++ b/src/bufio/bufio_test.go @@ -146,7 +146,7 @@ func TestReader(t *testing.T) { for i := 0; i < len(texts)-1; i++ { texts[i] = str + "\n" all += texts[i] - str += string(rune(i)%26 + 'a') + str += string(rune(i%26 + 'a')) } texts[len(texts)-1] = all -- 2.50.0