From: Serhiy Storchaka Date: Mon, 20 Apr 2015 06:31:51 +0000 (+0300) Subject: Issue #23728: binascii.crc_hqx() could return an integer outside of the range X-Git-Tag: v3.5.0b1~320^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e3037e114509913874a28746f5e05780919e909a;p=thirdparty%2FPython%2Fcpython.git Issue #23728: binascii.crc_hqx() could return an integer outside of the range 0-0xffff for empty data. --- e3037e114509913874a28746f5e05780919e909a diff --cc Misc/NEWS index a2204dd9b0ed,84bd2ccd560e..7fa01dd9ba6c --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -37,31 -29,9 +37,34 @@@ Core and Builtin Library ------- + - Issue #23728: binascii.crc_hqx() could return an integer outside of the range + 0-0xffff for empty data. + +- Issue #16914: new debuglevel 2 in smtplib adds timestamps to debug output. + +- Issue #7159: urllib.request now supports sending auth credentials + automatically after the first 401. This enhancement is a superset of the + enhancement from issue #19494 and supersedes that change. + +- Issue #23703: Fix a regression in urljoin() introduced in 901e4e52b20a. + Patch by Demian Brecht. + +- Issue #4254: Adds _curses.update_lines_cols() Patch by Arnon Yaari + +- Issue 19933: Provide default argument for ndigits in round. Patch by + Vajrasky Kok. + +- Issue #23193: Add a numeric_owner parameter to + tarfile.TarFile.extract and tarfile.TarFile.extractall. Patch by + Michael Vogt and Eric Smith. + +- Issue #23342: Add a subprocess.run() function than returns a CalledProcess + instance for a more consistent API than the existing call* functions. + +- Issue #21217: inspect.getsourcelines() now tries to compute the start and end + lines from the code object, fixing an issue when a lambda function is used as + decorator argument. Patch by Thomas Ballinger and Allison Kaptur. + - Issue #23811: Add missing newline to the PyCompileError error message. Patch by Alex Shkop. diff --cc Modules/clinic/binascii.c.h index d7c2ee64d705,ef646ddddc07..25d39d251980 --- a/Modules/clinic/binascii.c.h +++ b/Modules/clinic/binascii.c.h @@@ -283,9 -283,9 +283,9 @@@ binascii_crc_hqx(PyModuleDef *module, P &data, &crc)) goto exit; _return_value = binascii_crc_hqx_impl(module, &data, crc); -- if ((_return_value == -1) && PyErr_Occurred()) ++ if ((_return_value == (unsigned int)-1) && PyErr_Occurred()) goto exit; - return_value = PyLong_FromLong((long)_return_value); + return_value = PyLong_FromUnsignedLong((unsigned long)_return_value); exit: /* Cleanup for data */ @@@ -544,4 -543,4 +544,4 @@@ exit return return_value; } - /*[clinic end generated code: output=175025a8a94fbdd1 input=a9049054013a1b77]*/ -/*[clinic end generated code: output=22761b36f4f9e5bb input=a9049054013a1b77]*/ ++/*[clinic end generated code: output=5f8d3578618b3432 input=a9049054013a1b77]*/