2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

3825. [bug] Address sign extension bug in isc_regex_validate.

[RT #35758]
This commit is contained in:
Mark Andrews
2014-04-29 14:33:21 +10:00
parent e01fbe2a45
commit c11e46110b
2 changed files with 6 additions and 3 deletions

View File

@@ -1,3 +1,6 @@
3825. [bug] Address sign extension bug in isc_regex_validate.
[RT #35758]
3824. [bug] A collision between two flag values could cause
problems with cache cleaning when SIT was enabled.
[RT #35858]

View File

@@ -220,7 +220,7 @@ isc_regex_validate(const char *c) {
++c;
switch (*c) {
case '.': /* collating element */
if (range) --range;
if (range != 0) --range;
++c;
state = parse_ce;
seen_ce = ISC_FALSE;
@@ -255,11 +255,11 @@ isc_regex_validate(const char *c) {
default:
inside:
seen_char = ISC_TRUE;
if (range == 2 && *c < range_start)
if (range == 2 && (*c & 0xff) < range_start)
FAIL("out of order range");
if (range != 0)
--range;
range_start = *c;
range_start = *c & 0xff;
++c;
break;
};