aboutsummaryrefslogtreecommitdiff
path: root/libiberty/regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'libiberty/regex.c')
-rw-r--r--libiberty/regex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libiberty/regex.c b/libiberty/regex.c
index bc36f43..8337dea 100644
--- a/libiberty/regex.c
+++ b/libiberty/regex.c
@@ -3468,7 +3468,7 @@ PREFIX(regex_compile) (const char *ARG_PREFIX(pattern),
PATFETCH (c);
if ((c == '.' && *p == ']') || p == pend)
break;
- if (c1 < sizeof (str))
+ if (c1 < sizeof (str) - 1)
str[c1++] = c;
else
/* This is in any case an invalid class name. */