dmidecode
dmidecode copied to clipboard
Hello, smbios/structrue.go的GetString函数可能数组越界panic
func (s *Structure) GetString(offset int) string { if offset > s.FormattedCount()-1 { return "Unknown" }
index := s.Formatted[offset]
if index == 0 {
return "Unknown"
}
return s.Strings[index-1] // 这里是否需要判断下是否越界,否则异常下会直接panic?
}