From d23c70ce953d27a5c2cbe0ec1516d8749d0d2616 Mon Sep 17 00:00:00 2001
From: Cyrille Bagard <nocbos@gmail.com>
Date: Fri, 27 May 2022 18:12:59 +0200
Subject: Do not block when ABI flags are empty.

---
 plugins/pychrysalide/core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/plugins/pychrysalide/core.c b/plugins/pychrysalide/core.c
index 98f94b6..401aa33 100644
--- a/plugins/pychrysalide/core.c
+++ b/plugins/pychrysalide/core.c
@@ -24,6 +24,7 @@
 #include "core.h"
 
 
+
 #include <assert.h>
 #include <errno.h>
 #include <malloc.h>
@@ -249,7 +250,8 @@ static bool is_current_abi_suitable(void)
 #define GRAB_ABI_FLAGS_IN_PYTHON                        \
     "import sys" "\n"                                   \
     "import os" "\n"                                    \
-    "os.write(%d, bytes(sys.abiflags, 'UTF-8'))" "\n"
+    "data = bytes(sys.abiflags, 'UTF-8') + b'\\0'" "\n" \
+    "os.write(%d, data)" "\n"
 
     result = false;
 
-- 
cgit v0.11.2-87-g4458