2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 06:15:55 +00:00

Handle hostnames that start with numbers.

This involved needing to look at more than one token at a time, so
this patch moves from read() to mmap() of files, as a way to gracefully
rewind.

See RT ticket #16516 for (a lot) more.
This commit is contained in:
Shane Kerr
2007-05-23 15:29:49 +00:00
parent 6d7bdffcbd
commit 66eaae186e
3 changed files with 84 additions and 67 deletions

View File

@@ -52,6 +52,7 @@
#include <string.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <ctype.h>
#include <time.h>
@@ -272,8 +273,8 @@ struct parse {
int warnings_occurred;
int file;
char *inbuf;
unsigned bufix, buflen;
unsigned bufsiz;
size_t bufix, buflen;
size_t bufsiz;
};
/* Variable-length array of data. */