diff --git a/CHANGES b/CHANGES index 1f81cbf2a1..6be6cbca81 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1975. [bug] libbind: isc_gethexstring() could misparse multi-line + hex strings with comments. [RT #15814] + 1974. [doc] List each of the zone types and associated zone options seperately in the ARM. diff --git a/lib/bind/isc/hex.c b/lib/bind/isc/hex.c index e98a71fcdb..e43be4f3b5 100644 --- a/lib/bind/isc/hex.c +++ b/lib/bind/isc/hex.c @@ -45,8 +45,9 @@ isc_gethexstring(unsigned char *buf, size_t len, int count, FILE *fp, goto formerr; /* comment */ if (c == ';') { - while ((c = fgetc(fp)) != EOF && c != '\n') - /* empty */ + do { + c = fgetc(fp); + } while (c != EOF && c != '\n'); if (c == '\n' && *multiline) continue; goto formerr;