Commit 54c73d2
committed
gh-148731: Fix crash in Element.iter() on allocation failure
Initialize parent_stack and parent_stack_used before the fallible
PyMem_New call so that elementiter_dealloc does not dereference
an uninitialized pointer when the allocation fails.1 parent a52f428 commit 54c73d2
2 files changed
Lines changed: 5 additions & 1 deletion
File tree
- Misc/NEWS.d/next/Library
- Modules
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2368 | 2368 | | |
2369 | 2369 | | |
2370 | 2370 | | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
2371 | 2374 | | |
2372 | 2375 | | |
2373 | 2376 | | |
| |||
2378 | 2381 | | |
2379 | 2382 | | |
2380 | 2383 | | |
2381 | | - | |
2382 | 2384 | | |
2383 | 2385 | | |
2384 | 2386 | | |
| |||
0 commit comments