Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

Commit

Permalink
quantizer: make sure there are enough elements in slice before access…
Browse files Browse the repository at this point in the history
…ing (#421)

Fixes a panic which occurred in situations where the number of arguments
was "unorthodox".
  • Loading branch information
gbbr authored and Emanuele Palazzetti committed May 18, 2018
1 parent 100fc1d commit b8d39fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quantizer/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func QuantizeRedis(span *model.Span) {

command := strings.ToUpper(args[0])

if redisCompoundCommandSet[command] {
if redisCompoundCommandSet[command] && len(args) > 1 {
if strings.HasSuffix(args[1], redisTruncationMark) {
truncated = true
continue
Expand Down

0 comments on commit b8d39fe

Please sign in to comment.