Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347101
b: refs/heads/master
c: 99cca91
h: refs/heads/master
i:
  347099: cc63df4
v: v3
  • Loading branch information
David Howells authored and Rusty Russell committed Dec 14, 2012
1 parent d773c99 commit bb3fb31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: facc0a6bd494ce21e31b34fc355ecf702518272b
refs/heads/master: 99cca91e370ab9224755365dda98b78eb5a5417f
8 changes: 4 additions & 4 deletions trunk/lib/asn1_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static int asn1_find_indefinite_length(const unsigned char *data, size_t datalen
goto next_tag;
}

if (unlikely((tag & 0x1f) == 0x1f)) {
if (unlikely((tag & 0x1f) == ASN1_LONG_TAG)) {
do {
if (unlikely(datalen - dp < 2))
goto data_overrun_error;
Expand All @@ -96,7 +96,7 @@ static int asn1_find_indefinite_length(const unsigned char *data, size_t datalen
goto next_tag;
}

if (unlikely(len == 0x80)) {
if (unlikely(len == ASN1_INDEFINITE_LENGTH)) {
/* Indefinite length */
if (unlikely((tag & ASN1_CONS_BIT) == ASN1_PRIM << 5))
goto indefinite_len_primitive;
Expand Down Expand Up @@ -222,7 +222,7 @@ int asn1_ber_decoder(const struct asn1_decoder *decoder,
if (unlikely(dp >= datalen - 1))
goto data_overrun_error;
tag = data[dp++];
if (unlikely((tag & 0x1f) == 0x1f))
if (unlikely((tag & 0x1f) == ASN1_LONG_TAG))
goto long_tag_not_supported;

if (op & ASN1_OP_MATCH__ANY) {
Expand Down Expand Up @@ -254,7 +254,7 @@ int asn1_ber_decoder(const struct asn1_decoder *decoder,

len = data[dp++];
if (len > 0x7f) {
if (unlikely(len == 0x80)) {
if (unlikely(len == ASN1_INDEFINITE_LENGTH)) {
/* Indefinite length */
if (unlikely(!(tag & ASN1_CONS_BIT)))
goto indefinite_len_primitive;
Expand Down

0 comments on commit bb3fb31

Please sign in to comment.