go/src/text
Robert Griesemer 9956a5423e text/scanner: guard against installed IsIdentRune that accepts EOF
IsIdentRune may be installed by a client of the scanner. If the
installed function accepts EOF as a valid identifier rune, Scan
calls may not terminate.

Check for EOF when a user-defined IsIdentRune is used.

Fixes #50909.

Change-Id: Ib104b03ee59e2d58faa71f227c3b51ba424f7f61
Reviewed-on: https://go-review.googlesource.com/c/go/+/393254
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-03-17 03:41:50 +00:00
..
scanner text/scanner: guard against installed IsIdentRune that accepts EOF 2022-03-17 03:41:50 +00:00
tabwriter all: update references to symbols moved from io/ioutil to io 2020-10-20 18:41:18 +00:00
template text/template/parse: allow space after continue or break 2022-03-15 00:19:35 +00:00