Add jm_PREREQ_STRNLEN.
[gnulib.git] / regex.c
diff --git a/regex.c b/regex.c
index cd05bf8..591d6f1 100644 (file)
--- a/regex.c
+++ b/regex.c
@@ -1944,7 +1944,8 @@ struct range_table_work_area
  do { if (p != pend)                                                   \
      {                                                                 \
        PATFETCH (c);                                                   \
-       while (c == ' ') PATFETCH (c);                                  \
+       if (c == ' ')                                                   \
+        FREE_STACK_RETURN (REG_BADBR);                                 \
        while ('0' <= c && c <= '9')                                    \
         {                                                              \
            int prev;                                                   \
@@ -1958,7 +1959,8 @@ struct range_table_work_area
             break;                                                     \
           PATFETCH (c);                                                \
         }                                                              \
-       while (c == ' ') PATFETCH (c);                                  \
+       if (c == ' ')                                                   \
+        FREE_STACK_RETURN (REG_BADBR);                                 \
        }                                                               \
     } while (0)