fix: p9 unused parameter and containsBdRef bounds check

This commit is contained in:
Levi Neely 2026-02-26 22:58:32 +01:00
parent e064f926bf
commit 83c9136bdf
2 changed files with 2 additions and 3 deletions

View File

@ -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-")

View File

@ -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")
}