Skip to content

Commit eb5539e

Browse files
committed
Fix: check-log panic with invalid memory address or nil pointer dereference
1 parent e59230a commit eb5539e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

check-log/lib/check-log.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,9 @@ func findFileByInode(inode uint, dir string) (string, error) {
571571
if err != nil && !errors.Is(err, os.ErrNotExist) {
572572
return "", err
573573
}
574+
if fi == nil {
575+
continue
576+
}
574577
if detectInode(fi) == inode {
575578
return filepath.Join(dir, fi.Name()), nil
576579
}

0 commit comments

Comments
 (0)