go/src/cmd/internal
Russ Cox 835ff47c16 cmd/internal/buildid: reject empty id
The loop that makes progress assumes that after matching an id
you should advance len(id) bytes in the file. If id is the empty string,
then it will match and advance 0 bytes repeatedly.

0-byte ids are not really build IDs, so just reject it outright.

Fixes #47852.

Change-Id: Ie44a3a51dec22e2f68fb72d54ead91be98000cfe
Reviewed-on: https://go-review.googlesource.com/c/go/+/344049
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
2021-08-20 20:20:19 +00:00
..
archive cmd/internal/archive: make error message contain printable characters only 2021-04-30 18:43:09 +00:00
bio all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
browser all: introduce and use internal/execabs 2021-01-21 19:10:18 +00:00
buildid cmd/internal/buildid: reject empty id 2021-08-20 20:20:19 +00:00
codesign cmd/internal/codesign: new package 2020-12-01 21:41:39 +00:00
diff cmd/internal/diff: skip over Cygwin warning in diff output 2021-02-19 00:41:47 +00:00
dwarf cmd: support space and quotes in CC and CXX 2021-08-16 20:23:11 +00:00
edit
gcprog
goobj [dev.typeparams] cmd/internal/goobj: add duffzero/duffcopy to builtin list 2021-06-03 14:28:02 +00:00
moddeps cmd/internal/moddeps: use a temporary directory for GOMODCACHE if needed 2021-06-21 20:53:11 +00:00
obj cmd/internal/obj/arm64: disable the pre and post index formats for pseudo registers 2021-08-20 03:25:17 +00:00
objabi [dev.typeparams] runtime,cmd/compile,cmd/link: replace jmpdefer with a loop 2021-08-03 21:05:55 +00:00
objfile cmd/internal/objfile: add objabi.SNOPTRDATA to "D" 2021-05-10 18:10:43 +00:00
pkgpath all: introduce and use internal/execabs 2021-01-21 19:10:18 +00:00
src [dev.link] use per package filenames to build pclntab 2020-08-10 16:55:06 +00:00
str cmd/internal/str: add utilities for quoting and splitting args 2021-08-16 20:23:03 +00:00
sys cmd/internal/sys: mark windows/arm64 as c-shared-capable 2021-06-14 20:36:54 +00:00
test2json cmd/test2json: do not emit a final Action if the result is not known 2020-08-17 19:43:21 +00:00
traceviewer cmd/trace: move viewer data structs into cmd/internal/traceviewer 2020-08-12 18:34:48 +00:00