From eb5539e6c3546d05c4cab34e9207e909507a1bf9 Mon Sep 17 00:00:00 2001 From: ne-sachirou Date: Fri, 12 Apr 2024 19:28:00 +0900 Subject: [PATCH] Fix: check-log panic with invalid memory address or nil pointer dereference --- check-log/lib/check-log.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/check-log/lib/check-log.go b/check-log/lib/check-log.go index 743cdab9..f942c580 100644 --- a/check-log/lib/check-log.go +++ b/check-log/lib/check-log.go @@ -571,6 +571,9 @@ func findFileByInode(inode uint, dir string) (string, error) { if err != nil && !errors.Is(err, os.ErrNotExist) { return "", err } + if fi == nil { + continue + } if detectInode(fi) == inode { return filepath.Join(dir, fi.Name()), nil }