From 3cf314e85eb8f66b6a4e80c22dca7c616a781ad3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Tue, 6 Oct 2020 17:00:53 +0200 Subject: [PATCH] :bug: Fix envset vulnerability --- src/env/envset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/env/envset.c b/src/env/envset.c index b5e77ff1..26efc742 100644 --- a/src/env/envset.c +++ b/src/env/envset.c @@ -21,7 +21,7 @@ ANN static m_bool push(struct EnvSet *es, const Type t) { if(t->e->owner_class) CHECK_BB(push(es, t->e->owner_class)) else - env_push(es->env, NULL, t->e->ctx->nspc); + env_push(es->env, NULL, t->e->ctx ? t->e->ctx->nspc : es->env->curr); if(es->func && !(t->flag & es->flag)) CHECK_BB(es->func((void*)es->data, t->e->def)) if(GET_FLAG(t, template)) -- 2.43.0