diff options
author | Erwin Lansing <erwin@FreeBSD.org> | 2014-12-15 12:14:41 +0000 |
---|---|---|
committer | Erwin Lansing <erwin@FreeBSD.org> | 2014-12-15 12:14:41 +0000 |
commit | 4c9547cd12b5bb569f10b368eb6bb04d897d596f (patch) | |
tree | 025b1191fa4f9c03bf5345071dd2658f5d240b69 /lib/isc/regex.c | |
parent | 989b3b2d6068ce5b525479b7754977baf6364a7d (diff) |
Notes
Diffstat (limited to 'lib/isc/regex.c')
-rw-r--r-- | lib/isc/regex.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/isc/regex.c b/lib/isc/regex.c index 279bcdc437fb..2ee13653bdde 100644 --- a/lib/isc/regex.c +++ b/lib/isc/regex.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2013, 2014 Internet Systems Consortium, Inc. ("ISC") * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -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; }; |