2334. [bug] Bad REQUIRES in fromstruct_in_naptr(), off by one
bug in fromstruct_txt(). [RT #17609]
This commit is contained in:
@@ -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(®ion);
|
||||
isc_region_consume(®ion, 1);
|
||||
if (region.length <= length)
|
||||
if (region.length < length)
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
isc_region_consume(®ion, 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);
|
||||
|
||||
Reference in New Issue
Block a user