* lib/system-quote.c (system_quote): Allocate enough space for the
result.
+2023-04-24 Bruno Haible <bruno@clisp.org>
+
+ system-quote: Fix memory overrun bug on native Windows.
+ * lib/system-quote.c (system_quote): Allocate enough space for the
+ result.
+
2023-04-24 Bruno Haible <bruno@clisp.org>
unicodeio tests: Avoid test failures on native Windows.
case SCI_SYSTEM:
case SCI_WINDOWS_CMD:
{
- size_t length = system_quote_length (interpreter, string);
+ size_t length = system_quote_length (interpreter, string) + 1;
char *quoted = XNMALLOC (length, char);
system_quote_copy (quoted, interpreter, string);
return quoted;