go/src/go
Jorropo e704ef2b85 go/doc: fix incorrect identifier parsing in comments
This code was trying to iterate codepoints, but didn't reslice the string,
so it was reading the first codepoint over and over, if the string length was
not a multiple of the first codepoint length, this would cause to overshoot
past the end of the string.

This was a latent bug introduced in CL 384265 but was revealed to
Ngolo-fuzzing in OSS-Fuzz in CL 397277.

Fixes #52353

Change-Id: I13f0352e6ad13a42878927f3b1c18c58360dd40c
GitHub-Last-Rev: 424f6cfad1
GitHub-Pull-Request: golang/go#52356
Reviewed-on: https://go-review.googlesource.com/c/go/+/400240
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
2022-04-16 01:25:04 +00:00
..
ast go/ast, go/printer: recognize export and extern line directives 2022-04-11 22:03:44 +00:00
build all: gofmt main repo 2022-04-11 16:34:30 +00:00
constant all: gofmt main repo 2022-04-11 16:34:30 +00:00
doc go/doc: fix incorrect identifier parsing in comments 2022-04-16 01:25:04 +00:00
format all: gofmt main repo 2022-04-11 16:34:30 +00:00
importer internal/testenv: add GOROOT and use it to fix tests broken with -trimpath 2022-03-18 21:55:52 +00:00
internal all: gofmt main repo 2022-04-11 16:34:30 +00:00
parser all: gofmt main repo 2022-04-11 16:34:30 +00:00
printer go/ast, go/printer: recognize export and extern line directives 2022-04-11 22:03:44 +00:00
scanner all: gofmt main repo 2022-04-11 16:34:30 +00:00
token all: gofmt main repo 2022-04-11 16:34:30 +00:00
types all: gofmt main repo 2022-04-11 16:34:30 +00:00