diff options
author | Chet Ramey <chet.ramey@case.edu> | 2014-04-11 11:05:05 -0400 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2014-04-11 11:05:05 -0400 |
commit | 2b76266c887cb74ce9d760d5762d2de44b82473a (patch) | |
tree | 596d276b65dd8ef9cd1c23de15f05fdeee66553c /lib/sh | |
parent | 6ebbb24a5cc6e798e3c8f75e8617908b93a37d65 (diff) | |
download | bash-2b76266c887cb74ce9d760d5762d2de44b82473a.tar.gz |
Bash-4.3 patch 10
Diffstat (limited to 'lib/sh')
-rw-r--r-- | lib/sh/shquote.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/sh/shquote.c b/lib/sh/shquote.c index 31cce1c1..fff4f817 100644 --- a/lib/sh/shquote.c +++ b/lib/sh/shquote.c @@ -311,3 +311,17 @@ sh_contains_shell_metas (string) return (0); } + +int +sh_contains_quotes (string) + char *string; +{ + char *s; + + for (s = string; s && *s; s++) + { + if (*s == '\'' || *s == '"' || *s == '\\') + return 1; + } + return 0; +} |