Skip to content

Commit

Permalink
fix(logparser): fix possible slice bounds out of range
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Dec 11, 2023
1 parent 3e2bdf0 commit d1a88c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/logparser/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ func (GenericJSONParser) Parse(data []byte) (*Line, error) {
if err != nil {
return errors.Wrap(err, "ts")
}
if num := jx.Num(v); num.IsInt() {
if num, err := jx.DecodeStr(v).Num(); err == nil && num.IsInt() {
// Quoted integer.
ts, err := num.Int64()
if err != nil {
Expand Down

0 comments on commit d1a88c7

Please sign in to comment.