There was dummy loop with size limit for "performace" reasons,
but it triggered automatic checkers. Remove complexity
by using strchr() there.
Reported-By: David Binderman
}
/* bad fmt, decide between error codes */
}
/* bad fmt, decide between error codes */
- for (a = 0; end[a] && a < 5; a++) {
- if (end[a] == '}')
- return REG_BADBR;
- }
- return REG_EBRACE;
+ return strchr(end, '}') ? REG_BADBR : REG_EBRACE;
done:
ctx->last_elem->mincnt = a;
done:
ctx->last_elem->mincnt = a;