From c29e5a6210a8bd5682f2679cc7d447172b781f16 Mon Sep 17 00:00:00 2001
From: obarun <eric@obarun.org>
Date: Thu, 1 Jun 2023 20:27:16 +1100
Subject: [PATCH] key may be empty

---
 src/extra-tools/execl-envfile.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/extra-tools/execl-envfile.c b/src/extra-tools/execl-envfile.c
index 52dcbe87..68c6f4af 100644
--- a/src/extra-tools/execl-envfile.c
+++ b/src/extra-tools/execl-envfile.c
@@ -356,6 +356,9 @@ int main (int argc, char const *const *argv, char const *const *envp)
             if (!environ_get_key_nclean(&sa, &pos))
                 log_dieu(LOG_EXIT_SYS, "get key from line: ", sa.s + pos) ;
 
+            if (!sa.len)
+                continue ;
+
             char tkey[strlen(sa.s) + 1] ;
             auto_strings(tkey, sa.s) ;
 
-- 
GitLab