fix: p9 unused parameter and containsBdRef bounds check
This commit is contained in:
parent
e064f926bf
commit
83c9136bdf
|
|
@ -920,8 +920,7 @@ func containsBdRef(s string) bool {
|
|||
lower := strings.ToLower(s)
|
||||
idx := strings.Index(lower, "bd-")
|
||||
for idx != -1 {
|
||||
rest := lower[idx+3:]
|
||||
if len(rest) > 0 && isAlphanumeric(rest[0]) {
|
||||
if idx+3 < len(lower) && isAlphanumeric(lower[idx+3]) {
|
||||
return true
|
||||
}
|
||||
next := strings.Index(lower[idx+1:], "bd-")
|
||||
|
|
|
|||
|
|
@ -600,7 +600,7 @@ func (s *Server) open(cs *connState, fc *plan9.Fcall) *plan9.Fcall {
|
|||
return &plan9.Fcall{Type: plan9.Ropen, Tag: fc.Tag, Qid: qid}
|
||||
}
|
||||
|
||||
func (s *Server) create(cs *connState, fc *plan9.Fcall) *plan9.Fcall {
|
||||
func (s *Server) create(_ *connState, fc *plan9.Fcall) *plan9.Fcall {
|
||||
return errFcall(fc, "create not supported")
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in New Issue