From: Daniel Garcia Moreno Date: Thu, 23 Oct 2025 07:41:19 +0200 Subject: shell: free cmdline before continue This patch frees the cmdline when it's not empty but it doesn't contain any actual character. If the cmdline is just whitespaces or \r and \n, the loop continues without freeing the cmdline string, so it's a leak. Origin: https://gitlab.gnome.org/GNOME/libxml2/-/commit/5446460ad3229579c91506317fb80ab333d44414 Bug: https://gitlab.gnome.org/GNOME/libxml2/-/issues/1009 Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2026-1757 --- debugXML.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/debugXML.c b/debugXML.c index dfde58e..98e7de0 100644 --- a/debugXML.c +++ b/debugXML.c @@ -2874,8 +2874,11 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input, command[i++] = *cur++; } command[i] = 0; - if (i == 0) + if (i == 0) { + free(cmdline); + cmdline = NULL; continue; + } /* * Parse the argument