Commit d895b20d authored by Peter Schneider-Kamp's avatar Peter Schneider-Kamp

This closes bug #430849 (internal error produced by binascii.a2b_base64)

parent 22adac50
......@@ -335,6 +335,10 @@ binascii_a2b_base64(PyObject *self, PyObject *args)
if ( !PyArg_ParseTuple(args, "t#:a2b_base64", &ascii_data, &ascii_len) )
return NULL;
if ( ascii_len == 0) {
PyErr_SetString(Error, "Cannot decode empty input");
return NULL;
}
bin_len = ((ascii_len+3)/4)*3; /* Upper bound, corrected later */
/* Allocate the buffer */
......
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