Skip to content

Commit

Permalink
proto: fix nil deref
Browse files Browse the repository at this point in the history
  • Loading branch information
birdayz committed Aug 5, 2019
1 parent 8abb01e commit 4a4dc72
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/kaf/consume.go
Expand Up @@ -236,6 +236,9 @@ func protoDecode(b []byte, _type string) ([]byte, error) {
}

dynamicMessage := reg.MessageForType(_type)
if dynamicMessage == nil {
return b, nil
}

dynamicMessage.Unmarshal(b)

Expand Down

0 comments on commit 4a4dc72

Please sign in to comment.