Commit 7ba1fd75 authored by Sam Rushing's avatar Sam Rushing

_decode: avoid needless cast to long for INTEGER between 32 and 64 bits in size.

parent 5ef67208
......@@ -598,7 +598,7 @@ cdef object _decode (unsigned char * s, long * pos, long eos, bint just_tlv):
elif tag == TAGS_OCTET_STRING:
return decode_string (s, pos, length)
elif tag == TAGS_INTEGER:
if length > 4:
if length > sizeof (long):
return decode_long_integer (s, pos, length)
else:
return decode_integer (s, pos, length)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment