~ chicken-core (master) ecf45a0cdcbef595e6441bfe8e850ffa691ef600


commit ecf45a0cdcbef595e6441bfe8e850ffa691ef600
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Tue Sep 1 14:00:19 2026 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Tue Sep 1 14:00:19 2026 +0200

    Ensure buffer for fetching executable pathname is large enough
    
    Report and fix by "crzcrz"

diff --git a/runtime.c b/runtime.c
index 5fdfa471..b4d692f7 100644
--- a/runtime.c
+++ b/runtime.c
@@ -12803,7 +12803,7 @@ C_char *
 C_resolve_executable_pathname(C_char *fname)
 {
   int n;
-  C_WCHAR *buffer = (C_WCHAR *) C_malloc(C_MAX_PATH);
+  C_WCHAR *buffer = (C_WCHAR *) C_malloc(C_MAX_PATH * sizeof(C_WCHAR));
 
   if(buffer == NULL) return NULL;
 
Trap