From 4c53ff81c3196b7eecba614beb50ed6b2d29435f Mon Sep 17 00:00:00 2001
From: obarun <eric@obarun.org>
Date: Sun, 18 Jun 2023 22:02:40 +1100
Subject: [PATCH] fix stack allocation

---
 src/lib66/exec/ssexec_enable.c  | 2 +-
 src/lib66/module/parse_module.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib66/exec/ssexec_enable.c b/src/lib66/exec/ssexec_enable.c
index 5858ec2e..3d7afa79 100644
--- a/src/lib66/exec/ssexec_enable.c
+++ b/src/lib66/exec/ssexec_enable.c
@@ -16,10 +16,10 @@
 
 #include <oblibs/log.h>
 #include <oblibs/types.h> // FLAGS
-
 #include <oblibs/stack.h>
 
 #include <skalibs/sgetopt.h>
+
 #include <66/ssexec.h>
 #include <66/service.h>
 #include <66/state.h>
diff --git a/src/lib66/module/parse_module.c b/src/lib66/module/parse_module.c
index 7c60f580..d9d67206 100644
--- a/src/lib66/module/parse_module.c
+++ b/src/lib66/module/parse_module.c
@@ -361,7 +361,7 @@ void parse_module(resolve_service_t *res, resolve_service_t *ares, unsigned int
     char *src = res->sa.s + res->path.frontend ;
     char dirname[strlen(src)] ;
     char copy[SS_MAX_PATH_LEN + 1] ;
-    char ainsta[strlen(name)] ;
+    char ainsta[strlen(res->sa.s + res->name) + 1] ;
     stralloc list = STRALLOC_ZERO ;
     resolve_wrapper_t_ref wres = 0 ;
 
-- 
GitLab