a compiler warning on Solaris using GCC.
[ISC-Bugs #33032]
+- Add a check for too much whitespace in a config or lease file.
+ Thanks to Paolo Pellegrino for finding the issue and a suggestion
+ for the patch.
+ [ISC-Bugs #33351]
Changes since 4.2.4
- Correct code to calculate timing values in client to compare
*/
ofs = 0;
do {
+ if (ofs >= sizeof(cfile->tokbuf)) {
+ /*
+ * As the file includes a huge amount of whitespace,
+ * it's probably broken.
+ * Print out a warning and bail out.
+ */
+ parse_warn(cfile,
+ "whitespace too long, buffer overflow.");
+ log_fatal("Exiting");
+ }
cfile->tokbuf[ofs++] = c;
c = get_char(cfile);
} while (!((c == '\n') && cfile->eol_token) &&