aboutsummaryrefslogtreecommitdiffstats
path: root/src/asn1/ber_dec.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-03-22 01:45:15 +0000
committerlloyd <[email protected]>2012-03-22 01:45:15 +0000
commit6bff5e5cfbaa94d19f98edba76fe27a61c19eff5 (patch)
treef6367fe4a0a66697f4ee48e644e76b8d72add359 /src/asn1/ber_dec.cpp
parent9309bf44ca05e70100a4ef1653faf602e456cdd9 (diff)
Off by one in decode_constrained_integer, broke Session DER decoding
Diffstat (limited to 'src/asn1/ber_dec.cpp')
-rw-r--r--src/asn1/ber_dec.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/asn1/ber_dec.cpp b/src/asn1/ber_dec.cpp
index 4d800d471..164226e69 100644
--- a/src/asn1/ber_dec.cpp
+++ b/src/asn1/ber_dec.cpp
@@ -421,7 +421,8 @@ u64bit BER_Decoder::decode_constrained_integer(ASN1_Tag type_tag,
u64bit out = 0;
for(size_t i = 0; i != 8; ++i)
- out = (out << 8) | integer.byte_at(8-i);
+ out = (out << 8) | integer.byte_at(7-i);
+
return out;
}