Open nd-cyberprotect opened 8 months ago
Thanks for the report. It would be helpful to post which static analyzer tool you used.
Given that you found this problem, would you like to send a patch?
@mpvl
It would be helpful to post which static analyzer tool you used.
Svace
Given that you found this problem, would you like to send a patch?
Is it enough to change 0x8000
to len(decomps)
in x/text/unicode/norm/forminfo.go
on line 246 like:
} else if v >= len(decomps) {
?
as indicated by a preceding conditional expression
Yes, that looks like the right fix. Thanks.
It would be helpful to post which static analyzer tool you used. Svace
I hadn't heard of Svace before. Apparently it is a closed-source, multi-language, deep (interprocedural, context-sensitive, path-sensitive, SMT) static analysis tool developed at the Russian Academy of Sciences, and Samsung has been using it for many years. See:
Samsung has been using it
TIL that Samsung has "90 different C/C++ compilers" being used in house. Yikes.
Go version
go version go1.21.6 linux/amd64
Output of
go env
in your module/workspace:What did you do?
Ran static analyzer
What did you see happen?
Got critical:
What did you expect to see?
Please add control of index
v
values in range[len(decomps) : 32767]
if it is necessary.