From 4ab0db3c0468d0944b87bdf87da5203050db9eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?= Date: Fri, 2 Nov 2018 12:08:43 +0100 Subject: [PATCH] Make sure to quote empty strings --- sdn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdn.cpp b/sdn.cpp index bf12889..13e2f0e 100644 --- a/sdn.cpp +++ b/sdn.cpp @@ -114,7 +114,7 @@ fun needs_shell_quoting (const string &v) -> bool { for (auto c : v) if (strchr ("|&;<>()$`\\\"' \t\n" "*?[#˜=%" "!", c)) return true; - return false; + return v.empty (); } fun shell_escape (const string &v) -> string {