From 00f7ca8a73bd1ddfedb3d853d8e5ace05a39c791 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Thu, 1 Oct 2020 20:55:45 +0200 Subject: [PATCH] :bug: Fix ptr vulnerability --- src/lib/ptr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ptr.c b/src/lib/ptr.c index 2cfbefb2..2012bf5b 100644 --- a/src/lib/ptr.c +++ b/src/lib/ptr.c @@ -138,7 +138,7 @@ static DTOR(ptr_struct_dtor) { static OP_CHECK(opck_ptr_scan) { struct TemplateScan *ts = (struct TemplateScan*)data; - const Type t = (Type)scan_class(env, ts->t, ts->td); + DECL_ON(const Type, t, = (Type)scan_class(env, ts->t, ts->td)) const Type base = known_type(env, t->e->def->base.tmpl->call->td); if(isa(base, env->gwion->type[et_compound]) > 0 && !t->nspc->dtor) { t->nspc->dtor = new_vm_code(env->gwion->mp, NULL, SZ_INT, ae_flag_member | ae_flag_builtin, "@PtrDtor"); -- 2.43.0