#ifndef lint
static char copyright[] =
-"$Id: conflex.c,v 1.104 2006/08/02 22:36:00 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
+"$Id: conflex.c,v 1.105 2006/08/04 10:59:32 shane Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
return TOKEN_MAX;
if (!strcasecmp (atom + 3, "-balance"))
return MAX_BALANCE;
- if (!strcasecmp (atom + 3, "-lease-")) {
+ if (!strncasecmp (atom + 3, "-lease-", 7)) {
if (!strcasecmp(atom + 10, "misbalance"))
return MAX_LEASE_MISBALANCE;
if (!strcasecmp(atom + 10, "ownership"))
if (!strcasecmp(atom + 2, "arch"))
return SEARCH;
if (isascii(atom[2]) && tolower(atom[2]) == 'c') {
- if (!strcasecmp(atom + 3, "ond")) {
+ if (!strncasecmp(atom + 3, "ond", 3)) {
if (!strcasecmp(atom + 6, "ary"))
return SECONDARY;
if (!strcasecmp(atom + 6, "s"))
#ifndef lint
static char copyright[] =
-"$Id: options.c,v 1.96 2006/08/02 22:36:00 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
+"$Id: options.c,v 1.97 2006/08/04 10:59:32 shane Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#define DHCP_OPTION_DATA
/* If there aren't as many bytes left as there are in the source
* buffer, don't even bother entering the loop.
*/
- if (dst == NULL || src == NULL || (*dst >= dend) || (*src > send) ||
- *dst == NULL || *src == NULL ||
+ if (dst == NULL || dend == NULL || src == NULL || send == NULL ||
+ *dst == NULL || *src == NULL || (*dst >= dend) || (*src > send) ||
((send - *src) > (dend - *dst)))
return -1;
- for ( ; *src < send ; *src++) {
+ for ( ; *src < send ; (*src)++) {
if (!isascii (**src) || !isprint (**src)) {
/* Skip trailing NUL. */
if ((*src + 1) != send || **src != '\0') {
sprintf(*dst, "\\%03o",
**src);
- *dst += 4;
+ (*dst) += 4;
count += 4;
}
} else if (**src == '"' || **src == '\'' || **src == '$' ||
return -1;
**dst = '\\';
- *dst++;
+ (*dst)++;
**dst = **src;
- *dst++;
+ (*dst)++;
count += 2;
} else {
if (*dst + 1 > dend)
return -1;
**dst = **src;
- *dst++;
+ (*dst)++;
count++;
}
}
if (emit_quotes) {
**dst = '"';
- *dst++;
+ (*dst)++;
}
/* dend-1 leaves 1 byte for the closing quote. */
if (emit_quotes && (*dst < dend)) {
**dst = '"';
- *dst++;
+ (*dst)++;
/* Includes quote prior to pretty_escape(); */
count += 2;
#ifndef lint
static char copyright[] =
-"$Id: parse.c,v 1.116 2006/07/31 22:19:51 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
+"$Id: parse.c,v 1.117 2006/08/04 10:59:33 shane Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
u_int8_t hunkbuf [1024];
unsigned hunkix = 0;
const char *fmt, *f;
- struct option *option;
+ struct option *option=NULL;
struct iaddr ip_addr;
u_int8_t *dp;
unsigned len;