[issue34165] uu.decode() raises binascii.Error instead of uu.Error on invalid data

2018-07-20 Thread Jussi Judin
New submission from Jussi Judin : uu.decode() function can leak the internal binascii.Error exception from binascii.a2b_uu() function call instead of the documented uu.Error exception. Following code demonstrates the issue: >>> import uu >>> with open("in.uu", &

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

2018-07-20 Thread Jussi Judin
Jussi Judin 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):

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

2018-07-20 Thread Jussi Judin
New submission from Jussi Judin : base64.b32decode() function leads into "UnboundLocalError: local variable 'acc' referenced before assignment" when passing 8 equality signs as data: >>> import base64 >>> base64.b32decode(b"") Traceback (mos

[issue34088] sndhdr.what() throws exceptions on unknown files

2018-07-10 Thread Jussi Judin
New submission from Jussi Judin : sndhdr.what() function throws several types of exceptions on unknown files instead of returning None (as documentation says). Following code can replicate these crashes: ``` import sndhdr import sys sndhdr.what(sys.argv[1]) ``` First crash is from wave

[issue29612] TarFile.extract() suffers from hard links inside tarball

2017-02-21 Thread Jussi Judin
New submission from Jussi Judin: I managed to create a tarball that brought out quite nasty behavior with tarfile.TarFile.extract() and tarfile.TarFile.extractall() functions when there are hard links inside a tarball that point to themselves with a file that is included in the tarball