Skip to content

Commit

Permalink
fix: possible nil deref in admin_info (#3500)
Browse files Browse the repository at this point in the history
  • Loading branch information
wooffie authored Feb 11, 2025
1 parent 27cb17d commit 115de8e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions api/admin_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -1121,12 +1121,13 @@ LabelsWaitLoop:
if inStep != nil && *inStep > 0 {
step = *inStep
}
if step > 0 {
extraParamters = fmt.Sprintf("%s&step=%d", extraParamters, step)
}

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)
Expand Down

0 comments on commit 115de8e

Please sign in to comment.