summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2016-03-25 23:25:52 +0100
committerIlya Etingof <etingof@gmail.com>2016-03-25 23:25:52 +0100
commita5a176b842649485cbd48bf768588e5390a814b8 (patch)
treefe46305178df740ee6bcac7e086c91b257dccc09
parentcb12211f257d9582052461293b633012f60783f8 (diff)
parent4732e13377a242191a344bf691e09ef3c6c59002 (diff)
downloadpyasn1-git-a5a176b842649485cbd48bf768588e5390a814b8.tar.gz
Merge branch 'master' of github.com:etingof/pyasn1
-rw-r--r--pyasn1/codec/ber/decoder.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pyasn1/codec/ber/decoder.py b/pyasn1/codec/ber/decoder.py
index 1c9eb35..8de1d84 100644
--- a/pyasn1/codec/ber/decoder.py
+++ b/pyasn1/codec/ber/decoder.py
@@ -651,7 +651,9 @@ class Decoder:
tagClass = t&0xC0
tagFormat = t&0x20
tagId = t&0x1F
+ short = True
if tagId == 0x1F:
+ short = False
tagId = 0
while 1:
if not substrate:
@@ -666,7 +668,7 @@ class Decoder:
lastTag = tag.Tag(
tagClass=tagClass, tagFormat=tagFormat, tagId=tagId
)
- if tagId < 31:
+ if short:
# cache short tags
self.__tagCache[firstOctet] = lastTag
if tagSet is None: