Skip to content

Commit 1e94c42

Browse files
committed
undo removal of alloca in builtinimport.c
1 parent 4b1e9d8 commit 1e94c42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/builtinimport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ mp_obj_t mp_builtin___import__(size_t n_args, const mp_obj_t *args) {
330330
}
331331

332332
uint new_mod_l = (mod_len == 0 ? (size_t)(p - this_name) : (size_t)(p - this_name) + 1 + mod_len);
333-
char new_mod[new_mod_l];
333+
char *new_mod = alloca(new_mod_l);
334334
memcpy(new_mod, this_name, p - this_name);
335335
if (mod_len != 0) {
336336
new_mod[p - this_name] = '.';

0 commit comments

Comments
 (0)