Mercurial > hg > octave-nkf > gnulib-hg
comparison DEPENDENCIES @ 16705:54b750a813cb
regex: diagnose too-large repeat counts in EREs
Previously, the code did not diagnose the too-large repeat count
in EREs like 'b{1000000000}'; instead, it silently treated the ERE
as if it were 'b\{1000000000}', which is unexpected.
* lib/regcomp.c (parse_dup_op): Fail with REG_ESIZE if a repeat count
is too large. REG_ESIZE is used nowhere else, and the diagnostic
is a reasonable one for this problem. Another option would be to
create a new REG_OVERFLOW error for repeat counts that are too large.
(fetch_number): Return RE_DUP_MAX + 1, not REG_ERROR, if the repeat
count is too large, so that the caller can distinguish the two cases.
* lib/regex.h (_REG_ESIZE): Document that this is now a generic
"Too large" return code, and that repeat counts are one example of this.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Fri, 16 Mar 2012 14:17:55 -0700 |
parents | 2f911f94bb4f |
children | 579368b4bb16 |
comparison
equal
deleted
inserted
replaced
16704:4f6f5d9d5b77 | 16705:54b750a813cb |
---|