mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-04 17:46:36 +00:00
protect against emtpy wmi query result sets
If an WMI query were to return an empty result set, trying to access the first element in the result set would result in a `panic: runtime error: index out of range` error. add logic to explicitly check if the result set size is 0 and return an error rather. Fixes https://github.com/martinlindhe/wmi_exporter/issues/240
This commit is contained in:
1713
collector/mssql.go
1713
collector/mssql.go
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user