Update daemon_linux.go for preventing off-by-one
Array length should be bigger than 5, when accessing index 4
@@ -44,7 +44,7 @@ func (daemon *Daemon) cleanupMountsFromReaderByID(reader io.Reader, id string, u
regexps := getCleanPatterns(id)
sc := bufio.NewScanner(reader)
for sc.Scan() {
- if fields := strings.Fields(sc.Text()); len(fields) >= 4 {
+ if fields := strings.Fields(sc.Text()); len(fields) > 4 {
if mnt := fields[4]; strings.HasPrefix(mnt, daemon.root) {
for _, p := range regexps {
if p.MatchString(mnt) {
