Commit 0e30609d authored by Mark Andrews's avatar Mark Andrews
Browse files

2334. [bug] Bad REQUIRES in fromstruct_in_naptr(), off by one

                        bug in fromstruct_txt(). [RT #17609]
parent 9e8947d9
2334. [bug] Bad REQUIRES in fromstruct_in_naptr(), off by one
bug in fromstruct_txt(). [RT #17609]
2333. [bug] Fix off by one error in isc_time_nowplusinterval().
[RT #17608]
......
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: txt_16.c,v 1.43 2007/06/19 23:47:17 tbox Exp $ */
/* $Id: txt_16.c,v 1.44 2008/02/15 03:28:49 marka Exp $ */
/* Reviewed: Thu Mar 16 15:40:00 PST 2000 by bwelling */
......@@ -142,7 +142,7 @@ fromstruct_txt(ARGS_FROMSTRUCT) {
while (region.length > 0) {
length = uint8_fromregion(&region);
isc_region_consume(&region, 1);
if (region.length <= length)
if (region.length < length)
return (ISC_R_UNEXPECTEDEND);
isc_region_consume(&region, length);
}
......
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: naptr_35.c,v 1.51 2007/06/19 23:47:17 tbox Exp $ */
/* $Id: naptr_35.c,v 1.52 2008/02/15 03:28:49 marka Exp $ */
/* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */
......@@ -321,8 +321,8 @@ fromstruct_in_naptr(ARGS_FROMSTRUCT) {
REQUIRE(naptr->common.rdtype == type);
REQUIRE(naptr->common.rdclass == rdclass);
REQUIRE(naptr->flags != NULL || naptr->flags_len == 0);
REQUIRE(naptr->service != NULL && naptr->service_len == 0);
REQUIRE(naptr->regexp != NULL && naptr->regexp_len == 0);
REQUIRE(naptr->service != NULL || naptr->service_len == 0);
REQUIRE(naptr->regexp != NULL || naptr->regexp_len == 0);
UNUSED(type);
UNUSED(rdclass);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment