Skip to content

gh-101178: Fix UB in binascii.b2a_ascii85#148166

Open
StanFromIreland wants to merge 1 commit intopython:mainfrom
StanFromIreland:binascii.b2a_ascii85
Open

gh-101178: Fix UB in binascii.b2a_ascii85#148166
StanFromIreland wants to merge 1 commit intopython:mainfrom
StanFromIreland:binascii.b2a_ascii85

Conversation

@StanFromIreland
Copy link
Copy Markdown
Member

@StanFromIreland StanFromIreland commented Apr 6, 2026

Spotted when running the test:

$ ./python -m test test_binascii
Using random seed: 2254522381
0:00:00 load avg: 0.43 Run 1 test sequentially in a single process
0:00:00 load avg: 0.43 [1/1] test_binascii
Modules/binascii.c:1243:42: runtime error: left shift of 129 by 24 places cannot be represented in type 'int'
Modules/binascii.c:1484:42: runtime error: left shift of 130 by 24 places cannot be represented in type 'int'
0:00:00 load avg: 0.43 [1/1] test_binascii passed

== Tests result: SUCCESS ==

1 test OK.

Total duration: 89 ms
Total tests: run=197 skipped=17
Total test files: run=1/1
Result: SUCCESS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant