summaryrefslogtreecommitdiff
path: root/pyasn1/codec/ber/decoder.py
diff options
context:
space:
mode:
authorelie <elie>2015-04-25 09:53:43 +0000
committerelie <elie>2015-04-25 09:53:43 +0000
commit6cd6af222bb36726f95d486461589105840d883f (patch)
treebf1ea2ef1f99110854f629e652e147b7705beb8b /pyasn1/codec/ber/decoder.py
parent7ead58fff72d7a092c825b13daed9f9b95e156d8 (diff)
downloadpyasn1-6cd6af222bb36726f95d486461589105840d883f.tar.gz
fix to BitString and OctetString decoders dealing with constructed
encoding -- it used to be possible to embed other types in substrate
Diffstat (limited to 'pyasn1/codec/ber/decoder.py')
-rw-r--r--pyasn1/codec/ber/decoder.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pyasn1/codec/ber/decoder.py b/pyasn1/codec/ber/decoder.py
index 7bb09ea..2da4142 100644
--- a/pyasn1/codec/ber/decoder.py
+++ b/pyasn1/codec/ber/decoder.py
@@ -144,7 +144,7 @@ class BitStringDecoder(AbstractSimpleDecoder):
if substrateFun:
return substrateFun(r, substrate, length)
while head:
- component, head = decodeFun(head)
+ component, head = decodeFun(head, self.protoComponent)
r = r + component
return r, tail
@@ -154,7 +154,7 @@ class BitStringDecoder(AbstractSimpleDecoder):
if substrateFun:
return substrateFun(r, substrate, length)
while substrate:
- component, substrate = decodeFun(substrate)
+ component, substrate = decodeFun(substrate, self.protoComponent)
if eoo.endOfOctets.isSameTypeWith(component) and \
component == eoo.endOfOctets:
break
@@ -177,7 +177,7 @@ class OctetStringDecoder(AbstractSimpleDecoder):
if substrateFun:
return substrateFun(r, substrate, length)
while head:
- component, head = decodeFun(head)
+ component, head = decodeFun(head, self.protoComponent)
r = r + component
return r, tail
@@ -187,7 +187,7 @@ class OctetStringDecoder(AbstractSimpleDecoder):
if substrateFun:
return substrateFun(r, substrate, length)
while substrate:
- component, substrate = decodeFun(substrate)
+ component, substrate = decodeFun(substrate, self.protoComponent)
if eoo.endOfOctets.isSameTypeWith(component) and \
component == eoo.endOfOctets:
break