aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2018-11-02 12:08:43 +0100
committerPřemysl Janouch <p@janouch.name>2018-11-02 12:08:43 +0100
commit4ab0db3c0468d0944b87bdf87da5203050db9eb8 (patch)
tree22c0ce768d8a8edbe07eb204f205fcd43efd9d0e
parent3624636c2f2b548c40e707475b0e652ab2f47eed (diff)
downloadsdn-4ab0db3c0468d0944b87bdf87da5203050db9eb8.tar.gz
sdn-4ab0db3c0468d0944b87bdf87da5203050db9eb8.tar.xz
sdn-4ab0db3c0468d0944b87bdf87da5203050db9eb8.zip
Make sure to quote empty strings
-rw-r--r--sdn.cpp2
1 files changed, 1 insertions, 1 deletions
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 {