From 4c9547cd12b5bb569f10b368eb6bb04d897d596f Mon Sep 17 00:00:00 2001 From: Erwin Lansing Date: Mon, 15 Dec 2014 12:14:41 +0000 Subject: Vendor import of BIND 9.9.6-P1 Sponsored by: DK Hostmaster A/S --- lib/isc/regex.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/isc/regex.c') 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; }; -- cgit v1.2.3