#ifndef lint
static char copyright[] =
-"$Id: confpars.c,v 1.136 2001/03/17 01:24:59 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: confpars.c,v 1.137 2001/03/17 02:02:20 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
if (token == STRING) {
unsigned char *tuid;
token = next_token (&val, &buflen, cfile);
- if (buflen < sizeof lease -> uid_buf)
+ if (buflen < sizeof lease -> uid_buf) {
tuid = lease -> uid_buf;
- else {
+ lease -> uid_max =
+ sizeof lease -> uid_buf;
+ } else {
tuid = ((unsigned char *)
dmalloc (buflen, MDL));
if (!tuid) {
MDL);
return 0;
}
+ lease -> uid_max = buflen;
}
lease -> uid_len = buflen;
memcpy (tuid, val, lease -> uid_len);
return 0;
}
lease -> uid_len = buflen;
+ lease -> uid_max = buflen;
if (lease -> uid_len == 0) {
lease -> uid = (unsigned char *)0;
parse_warn (cfile, "zero-length uid");