Skip to content

Commit

Permalink
fix: update code
Browse files Browse the repository at this point in the history
Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
  • Loading branch information
JeyJeyGao committed Aug 3, 2023
1 parent bc18cae commit a8ba0ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/encoding/asn1/asn1.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ func decodeIdentifier(r []byte) ([]byte, []byte, error) {
for offset < len(r) && r[offset]&0x80 == 0x80 {
offset++
}
if offset >= len(r) {
return nil, nil, ErrEarlyEOF
}
offset++
}
return r[:offset], r[offset:], nil
}
Expand Down

0 comments on commit a8ba0ff

Please sign in to comment.