Skip to content

Commit 8a57c23

Browse files
committed
add error checking in USE_LABEL
1 parent bb16973 commit 8a57c23

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Python/compile.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,10 @@ static struct jump_target_label_ NO_LABEL = {-1};
157157
return 0; \
158158
}
159159

160-
#define USE_LABEL(C, LBL) cfg_builder_use_label(CFG_BUILDER(C), LBL)
160+
#define USE_LABEL(C, LBL) \
161+
if (cfg_builder_use_label(CFG_BUILDER(C), LBL) < 0) { \
162+
return 0; \
163+
}
161164

162165
struct instr {
163166
int i_opcode;

0 commit comments

Comments
 (0)