From: Mark Andrews Date: Tue, 22 Jan 2002 06:08:47 +0000 (+0000) Subject: pullup: X-Git-Tag: v9.2.0^2~62 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=8ac220d5cc955d30fc64e329089d60effd880ff6;p=thirdparty%2Fbind9.git pullup: 1186. [bug] isc_hex_tobuffer(,,length = 0) failed to unget the EOL token when reading to end of line. --- diff --git a/CHANGES b/CHANGES index 9c0a3b33e1a..77626da49ed 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1186. [bug] isc_hex_tobuffer(,,length = 0) failed to unget the + EOL token when reading to end of line. + 1182. [bug] The server could throw an assertion failure when constructing a negative response packet. diff --git a/lib/isc/hex.c b/lib/isc/hex.c index 84a608f2a25..2493f656a1b 100644 --- a/lib/isc/hex.c +++ b/lib/isc/hex.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: hex.c,v 1.8 2001/03/22 00:07:05 bwelling Exp $ */ +/* $Id: hex.c,v 1.8.2.1 2002/01/22 06:08:47 marka Exp $ */ #include @@ -147,6 +147,8 @@ isc_hex_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length) { for (i = 0 ;i < tr->length; i++) RETERR(hex_decode_char(&ctx, tr->base[i])); } + if (ctx.length < 0) + isc_lex_ungettoken(lexer, &token); RETERR(hex_decode_finish(&ctx)); return (ISC_R_SUCCESS); }