mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
When parsing a hex string of unknown length, properly unget the EOL token
at the end. This doesn't affect any existing code, since the one caller passes a known length, but it's still a bug.
This commit is contained in:
parent
ef38731b6f
commit
6e8b843125
1 changed files with 3 additions and 1 deletions
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: hex.c,v 1.10 2001/11/27 01:55:58 gson Exp $ */
|
||||
/* $Id: hex.c,v 1.11 2002/01/15 02:10:10 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue