VDB
Sign up
HIGH7.5

GO-2023-1702

Infinite loop in parsing in go/scanner

Quick fix

GO-2023-1702 — stdlib: upgrade to the fixed version with the command below.

go get stdlib@v1.19.8

Details

Calling any of the Parse functions on Go source code which contains //line directives with very large line numbers can cause an infinite loop due to integer overflow.

Are you affected?

Enter the version of the package you're using.

Affected packages

Go/stdlib
Introduced in: 0Fixed in: 1.19.8
Fixgo get stdlib@v1.19.8

References