gh-139146: Check calloc() results in test_pre_initialization_sys_options - #139147
Conversation
b4619e8 to
3be06fb
Compare
…s_options Reported by: Dmitrii Chuprov cheese@altlinux.org Signed-off-by: Denis Sergeev <zeff@altlinux.org>
34262eb to
4e88014
Compare
…initialization_sys_options` (pythonGH-139147) (cherry picked from commit 9c6a1f8) Co-authored-by: Denis Sergeev <zeff@altlinux.org> Reported by: Dmitrii Chuprov <cheese@altlinux.org> Signed-off-by: Denis Sergeev <zeff@altlinux.org>
…initialization_sys_options` (pythonGH-139147) (cherry picked from commit 9c6a1f8) Co-authored-by: Denis Sergeev <zeff@altlinux.org> Reported by: Dmitrii Chuprov <cheese@altlinux.org> Signed-off-by: Denis Sergeev <zeff@altlinux.org>
|
GH-139413 is a backport of this pull request to the 3.14 branch. |
|
GH-139414 is a backport of this pull request to the 3.13 branch. |
…_initialization_sys_options` (GH-139147) (#139414) gh-139146: Check `calloc()` results in `_testembed.c::test_pre_initialization_sys_options` (GH-139147) (cherry picked from commit 9c6a1f8) Reported by: Dmitrii Chuprov <cheese@altlinux.org> Signed-off-by: Denis Sergeev <zeff@altlinux.org> Co-authored-by: Denis Sergeev <zeff@altlinux.org>
|
|
|
This is an unrelated failure. Don't worry. |
|
Got it, thanks! |

In
test_pre_initialization_sys_options()(Programs/_testembed.c),the results of
calloc()were not checked before passing the pointersto
wcsncpy(). On allocation failure (OOM), this could lead to a NULL dereference.This patch adds NULL checks for both allocations and frees already allocated
memory before returning on error.
skip news