summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2018-01-23 23:47:44 -0500
committerDan Halbert <halbert@halwitz.org>2018-01-23 23:47:44 -0500
commit1e94c4240cb12fcbb65831e608a9408e1e76fd87 (patch)
tree27a8fbafbd45c6123480cf6438ee0a7cfa485fcc /py
parent4b1e9d8f92aa948f8ecccf364edcb911a135f2c8 (diff)
undo removal of alloca in builtinimport.c
Diffstat (limited to 'py')
-rw-r--r--py/builtinimport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/builtinimport.c b/py/builtinimport.c
index 0caba74f4..b76ea00bd 100644
--- a/py/builtinimport.c
+++ b/py/builtinimport.c
@@ -330,7 +330,7 @@ mp_obj_t mp_builtin___import__(size_t n_args, const mp_obj_t *args) {
}
uint new_mod_l = (mod_len == 0 ? (size_t)(p - this_name) : (size_t)(p - this_name) + 1 + mod_len);
- char new_mod[new_mod_l];
+ char *new_mod = alloca(new_mod_l);
memcpy(new_mod, this_name, p - this_name);
if (mod_len != 0) {
new_mod[p - this_name] = '.';