8000 bpo-41995: Fix null ptr deref in tracemalloc_copy_trace() (GH-22660) · python/cpython@afe8606 · GitHub
[go: up one dir, main page]

Skip to content

Commit afe8606

Browse files
bpo-41995: Fix null ptr deref in tracemalloc_copy_trace() (GH-22660)
Fix a null pointer dereference in tracemalloc_copy_trace() of _tracemalloc. (cherry picked from commit 66c28f5) Co-authored-by: Yunlongs <lylgood@foxmail.com>
1 parent 15ef19f commit afe8606
8000

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_tracemalloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1199,7 +1199,7 @@ tracemalloc_copy_trace(_Py_hashtable_t *traces,
11991199
trace_t *trace = (trace_t *)value;
12001200

12011201
trace_t *trace2 = raw_malloc(sizeof(trace_t));
1202-
if (traces2 == NULL) {
1202+
if (trace2 == NULL) {
12031203
return -1;
12041204
}
12051205
*trace2 = *trace;

0 commit comments

Comments
 (0)
0