Commit 7ef0e32
committed
gh-154781: Zero the in_wstr() buffer in curses
winnwstr() only writes the terminating null when it stored at least one
character, so with n of 0 the result was read from uninitialized memory. Use
PyMem_Calloc, like in_wchstr() already does.1 parent 92efaff commit 7ef0e32
2 files changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
517 | 523 | | |
518 | 524 | | |
519 | 525 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3850 | 3850 | | |
3851 | 3851 | | |
3852 | 3852 | | |
3853 | | - | |
| 3853 | + | |
| 3854 | + | |
| 3855 | + | |
3854 | 3856 | | |
3855 | 3857 | | |
3856 | 3858 | | |
| |||
0 commit comments