about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/computil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 6bc7acbc8..e927081f7 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -3261,7 +3261,7 @@ cfp_opt_pats(char **pats, char *matcher)
 	if (haswilds(t))
 	    return;
     }
-    add = (char *) zhalloc(sizeof(compprefix) * 2 + 1);
+    add = (char *) zhalloc(strlen(compprefix) * 2 + 1);
     for (s = compprefix, t = add; *s; s++) {
 	if (*s != '\\' || !s[1] || s[1] == '*' || s[1] == '?' ||
 	    s[1] == '<' || s[1] == '>' || s[1] == '(' || s[1] == ')' ||