Skip to content

Commit 7d4cd2f

Browse files
committed
Fix potential NULL pointer dereferencing in ast module
CID 719690
2 parents 0b6bd1d + 6decb24 commit 7d4cd2f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/ast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,11 +528,11 @@ init_normalization(struct compiling *c)
528528
if (!c->c_normalize)
529529
return 0;
530530
c->c_normalize_args = Py_BuildValue("(sN)", "NFKC", Py_None);
531-
PyTuple_SET_ITEM(c->c_normalize_args, 1, NULL);
532531
if (!c->c_normalize_args) {
533532
Py_CLEAR(c->c_normalize);
534533
return 0;
535534
}
535+
PyTuple_SET_ITEM(c->c_normalize_args, 1, NULL);
536536
return 1;
537537
}
538538

0 commit comments

Comments
 (0)