fix: possible nil deref in admin_info (#3500)

This commit is contained in:
Burkov Egor
2025-02-11 05:04:21 +03:00
committed by GitHub
parent 27cb17dbfd
commit 115de8ee25

View File

@@ -1121,12 +1121,13 @@ LabelsWaitLoop:
if inStep != nil && *inStep > 0 { if inStep != nil && *inStep > 0 {
step = *inStep step = *inStep
} }
if step > 0 {
extraParamters = fmt.Sprintf("%s&step=%d", extraParamters, step)
}
if inStart != nil && inEnd != nil { if inStart != nil && inEnd != nil {
extraParamters = fmt.Sprintf("&start=%d&end=%d&step=%d", *inStart, *inEnd, *inStep) extraParamters = fmt.Sprintf("&start=%d&end=%d", *inStart, *inEnd)
}
if step > 0 {
extraParamters = fmt.Sprintf("%s&step=%d", extraParamters, step)
} }
// replace the `$__rate_interval` global for step with unit (s for seconds) // replace the `$__rate_interval` global for step with unit (s for seconds)