]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #23728: binascii.crc_hqx() could return an integer outside of the range
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 20 Apr 2015 06:31:51 +0000 (09:31 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Mon, 20 Apr 2015 06:31:51 +0000 (09:31 +0300)
0-0xffff for empty data.

1  2 
Lib/test/test_binascii.py
Misc/NEWS
Modules/binascii.c
Modules/clinic/binascii.c.h

Simple merge
diff --cc Misc/NEWS
index a2204dd9b0edace7ba39828333f78057229e633e,84bd2ccd560eb302f96f0322c1f8a4d89e8eb2f7..7fa01dd9ba6c9e25025ec078dad7f65400805e36
+++ 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.
  
Simple merge
index d7c2ee64d705a9cc09f7665437338e42940665df,ef646ddddc07c43a168e63bc62f66abc797ef48e..25d39d2519801a6d5e9c55913a17e9d6b8e8615c
@@@ -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]*/