[issue34164] base64.b32decode() leads into UnboundLocalError and OverflowError on some data

Jussi Judin report at bugs.python.org
Fri Jul 20 05:28:43 EDT 2018


Jussi Judin <jjudin+python at iki.fi> added the comment:

Apparently base64.b32decode() also has another issue that I missed when going through the issues with base64 module:

>>> import base64
>>> base64.b32decode(b"M===============================")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/tmp/python-3.7-bin/lib/python3.7/base64.py", line 236, in b32decode
    last = acc.to_bytes(5, 'big')
OverflowError: int too big to convert

----------
title: base64.b32decode() leads into UnboundLocalError on some data -> base64.b32decode() leads into UnboundLocalError and OverflowError on some data

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34164>
_______________________________________


More information about the Python-bugs-list mailing list