Repository navigation
Commit ae62786
gh-160162: Fix crash in int left shift with huge count on 32-bit (GH-160163)
Bound the shift count by MAX_LONG_DIGITS*PyLong_SHIFT instead of
PY_SSIZE_T_MAX*PyLong_SHIFT, so that the result size computed in
long_lshift1() cannot overflow Py_ssize_t.
(cherry picked from commit d4750a7)
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
1 parent a5285c7 commit ae62786
3 files changed
Lines changed: 16 additions & 1 deletion
File tree
- Lib/test
- Misc/NEWS.d/next/Core_and_Builtins
- Objects
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
996 | 996 | | |
997 | 997 | | |
998 | 998 | | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
999 | 1009 | | |
1000 | 1010 | | |
1001 | 1011 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5530 | 5530 | | |
5531 | 5531 | | |
5532 | 5532 | | |
5533 | | - | |
| 5533 | + | |
| 5534 | + | |
| 5535 | + | |
5534 | 5536 | | |
5535 | 5537 | | |
5536 | 5538 | | |
| |||
0 commit comments