From c6ddee8f7e7f246c4384b05384057c24231937a1 Mon Sep 17 00:00:00 2001 From: sentriz Date: Mon, 12 Dec 2022 20:02:28 +0000 Subject: [PATCH] fix(subsonic): update music folder id in bounds check fixes #271 --- server/ctrlsubsonic/handlers_common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/ctrlsubsonic/handlers_common.go b/server/ctrlsubsonic/handlers_common.go index 3121016..a1d1d86 100644 --- a/server/ctrlsubsonic/handlers_common.go +++ b/server/ctrlsubsonic/handlers_common.go @@ -35,7 +35,7 @@ func getMusicFolder(musicPaths paths.MusicPaths, p params.Params) string { if err != nil { return "" } - if idx < 0 || idx > len(musicPaths) { + if idx < 0 || idx >= len(musicPaths) { return "" } return musicPaths[idx].Path