You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No issue reported for resclicing a slice whose length is smaller than the reslice upper limit. Could lead to DoS attacks. Staticcheck also doesn't seem to alert on this.
Steps to reproduce the behavior
Run against
package main
import"fmt"funcmain() {
bb:=make([]byte, 0)
fmt.Println(bb[:3])
}
Summary
No issue reported for resclicing a slice whose length is smaller than the reslice upper limit. Could lead to DoS attacks. Staticcheck also doesn't seem to alert on this.
Steps to reproduce the behavior
Run against
Reports no errors
gosec version
Latest from master
Go version (output of 'go version')
go version go1.19 linux/amd64
Operating system / Environment
Ubuntu 18.04
Expected behavior
Maybe report an error length has not been verified so may cause a panic?
Actual behavior
No issue reported.
The text was updated successfully, but these errors were encountered: