aboutsummaryrefslogtreecommitdiffstats
path: root/dfa.c
diff options
context:
space:
mode:
Diffstat (limited to 'dfa.c')
-rw-r--r--dfa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dfa.c b/dfa.c
index 8b79eb77..490a0753 100644
--- a/dfa.c
+++ b/dfa.c
@@ -1038,7 +1038,8 @@ parse_bracket_exp (void)
/* This is in any case an invalid class name. */
str[0] = '\0';
}
- str[len] = '\0';
+ if (len < BRACKET_BUFFER_SIZE)
+ str[len] = '\0';
/* Fetch bracket. */
FETCH_WC (c, wc, _("unbalanced ["));