summaryrefslogtreecommitdiffstats
path: root/src/bfstd.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-10-18 11:34:21 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-10-18 11:34:21 -0400
commit8560c29d22462764dbf88f52451f8dfe84ad9d4c (patch)
tree10b20853efe4a40c15205b66bec42dc114392aaa /src/bfstd.c
parentdd1c8c2f08d232d5745dc1f5fe483ec4072fe454 (diff)
downloadbfs-8560c29d22462764dbf88f52451f8dfe84ad9d4c.tar.xz
wordesc: Don't allow braces in bare words
Things like {a,b} should be quoted to avoid brace expansion.
Diffstat (limited to 'src/bfstd.c')
-rw-r--r--src/bfstd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bfstd.c b/src/bfstd.c
index a4ae439..ace9ed2 100644
--- a/src/bfstd.c
+++ b/src/bfstd.c
@@ -816,7 +816,7 @@ static char *dollar_quote(char *dest, char *end, const char *str, size_t len, en
/** How much of this string is safe as a bare word? */
static size_t bare_len(const char *str, size_t len) {
// https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02
- size_t ret = strcspn(str, "|&;<>()$`\\\"' *?[#˜=%!");
+ size_t ret = strcspn(str, "|&;<>()$`\\\"' *?[#˜=%!{}");
return ret < len ? ret : len;
}