Merge lp:~gz/brz/crc_asul into lp:brz

Proposed by Martin Packman
Status: Merged
Approved by: Martin Packman
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~gz/brz/crc_asul
Merge into: lp:brz
Diff against target: 30 lines (+3/-3)
1 file modified
breezy/bzr/_chk_map_pyx.pyx (+3/-3)
To merge this branch: bzr merge lp:~gz/brz/crc_asul
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+358941@code.launchpad.net

Commit message

Possible fix for OverflowError in _search_key_255

Description of the change

Possible fix for OverflowError in _search_key_255

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908984

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Thanks! Verified on armhf.

review: Approve
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'breezy/bzr/_chk_map_pyx.pyx'
--- breezy/bzr/_chk_map_pyx.pyx 2018-07-12 01:43:49 +0000
+++ breezy/bzr/_chk_map_pyx.pyx 2018-11-17 18:22:51 +0000
@@ -41,7 +41,7 @@
41 PyDict_SetItem,41 PyDict_SetItem,
42 )42 )
43from cpython.int cimport (43from cpython.int cimport (
44 PyInt_AS_LONG,44 PyInt_AsUnsignedLongMask,
45 )45 )
46from cpython.object cimport (46from cpython.object cimport (
47 PyObject,47 PyObject,
@@ -102,7 +102,7 @@
102 if i > 0:102 if i > 0:
103 c_out[0] = c'\x00'103 c_out[0] = c'\x00'
104 c_out = c_out + 1104 c_out = c_out + 1
105 crc_val = PyInt_AS_LONG(crc32(key[i])) & <unsigned long>0xFFFFFFFF105 crc_val = PyInt_AsUnsignedLongMask(crc32(key[i])) & 0xFFFFFFFFUL
106 # Hex(val) order106 # Hex(val) order
107 sprintf(c_out, '%08lX', crc_val)107 sprintf(c_out, '%08lX', crc_val)
108 c_out = c_out + 8108 c_out = c_out + 8
@@ -127,7 +127,7 @@
127 if i > 0:127 if i > 0:
128 c_out[0] = c'\x00'128 c_out[0] = c'\x00'
129 c_out = c_out + 1129 c_out = c_out + 1
130 crc_val = PyInt_AS_LONG(crc32(key[i]))130 crc_val = PyInt_AsUnsignedLongMask(crc32(key[i]))
131 # MSB order131 # MSB order
132 c_out[0] = (crc_val >> 24) & 0xFF132 c_out[0] = (crc_val >> 24) & 0xFF
133 c_out[1] = (crc_val >> 16) & 0xFF133 c_out[1] = (crc_val >> 16) & 0xFF

Subscribers

People subscribed via source and target branches