Skip to content

Commit e62df71

Browse files
authored
fix flag conversion to fix the security warning (#417)
Fixes https://github.com/dgraph-io/ristretto/security/code-scanning/9
1 parent c627211 commit e62df71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

z/flags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ func (sf *SuperFlag) GetDuration(opt string) time.Duration {
184184
}
185185
if strings.Contains(val, "d") {
186186
val = strings.Replace(val, "d", "", 1)
187-
days, err := strconv.ParseUint(val, 0, 64)
187+
days, err := strconv.ParseInt(val, 0, 64)
188188
if err != nil {
189189
return time.Duration(0)
190190
}

0 commit comments

Comments
 (0)