FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-101178: Fix UB in `binascii.b2a_ascii85` by StanFromIreland · Pull Request #148166 · python/cpython · GitHub

Repository navigation

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

Merged
StanFromIreland merged 1 commit into
python:mainfrom
StanFromIreland:binascii.b2a_ascii85
Apr 7, 2026
Merged

StanFromIreland merged 1 commit into
python:mainfrom
StanFromIreland:binascii.b2a_ascii85

Conversation

StanFromIreland commented Apr 6, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

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

serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Good catch. LGTM. 👍

StanFromIreland merged commit 63d3c49 into python:main Apr 7, 2026
59 checks passed
StanFromIreland deleted the binascii.b2a_ascii85 branch April 7, 2026 07:44
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL