diff options
author | Robert Griesemer <gri@golang.org> | 2022-03-15 21:44:37 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2022-03-17 03:41:50 +0000 |
commit | 9956a5423e40bab92c572489eae26ba80ed803ab (patch) | |
tree | e0a6fa96e3a735f9e006bf4b5174f39e4ea35909 /src/cmd | |
parent | 8427429c592588af8c49522c76b3e0e0e335d270 (diff) | |
download | go-git-9956a5423e40bab92c572489eae26ba80ed803ab.tar.gz |
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>
Diffstat (limited to 'src/cmd')
0 files changed, 0 insertions, 0 deletions