mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
#4542: On Windows, binascii.crc32 still accepted str as binary input.
This fixes test_binascii. Will backport to 3.0
This commit is contained in:
parent
bc2ce57203
commit
bc9d4749f2
2 changed files with 4 additions and 1 deletions
|
|
@ -16,6 +16,9 @@ Core and Builtins
|
|||
Library
|
||||
-------
|
||||
|
||||
- Issue #4542: On Windows, binascii.crc32 still accepted str as binary input;
|
||||
the corresponding tests now pass.
|
||||
|
||||
- Issue #4537: webbrowser.UnixBrowser would fail to open the browser because
|
||||
it was calling the wrong open() function.
|
||||
|
||||
|
|
|
|||
|
|
@ -1019,7 +1019,7 @@ binascii_crc32(PyObject *self, PyObject *args)
|
|||
Py_ssize_t len;
|
||||
unsigned int result;
|
||||
|
||||
if ( !PyArg_ParseTuple(args, "s*|I:crc32", &pbin, &crc) )
|
||||
if ( !PyArg_ParseTuple(args, "y*|I:crc32", &pbin, &crc) )
|
||||
return NULL;
|
||||
bin_data = pbin.buf;
|
||||
len = pbin.len;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue