summaryrefslogtreecommitdiffstats
path: root/if-options.h
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-01-26 09:11:38 +0000
committerRoy Marples <roy@marples.name>2009-01-26 09:11:38 +0000
commit4fb0c27c39d95db8fd8d4da3a3fb552d79f20613 (patch)
treede03534c9bf2d2e9e97779eb3f92eb3afaf634a0 /if-options.h
parentc735a7323a86d426d529573598ccce3859484cbf (diff)
downloaddhcpcd-4fb0c27c39d95db8fd8d4da3a3fb552d79f20613.tar.xz
Ensure that we have enough buffer for gethostname and terminate it correctly.
Diffstat (limited to 'if-options.h')
-rw-r--r--if-options.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/if-options.h b/if-options.h
index 95e83dc6..5a8b8aaf 100644
--- a/if-options.h
+++ b/if-options.h
@@ -89,12 +89,12 @@ struct if_options {
char **environ;
char script[PATH_MAX];
- char hostname[HOSTNAME_MAX_LEN + 1];
+ char hostname[HOSTNAME_MAX_LEN + 2];
int fqdn;
- uint8_t vendorclassid[VENDORCLASSID_MAX_LEN + 1];
- char clientid[CLIENTID_MAX_LEN + 1];
- uint8_t userclass[USERCLASS_MAX_LEN + 1];
- uint8_t vendor[VENDOR_MAX_LEN + 1];
+ uint8_t vendorclassid[VENDORCLASSID_MAX_LEN + 2];
+ char clientid[CLIENTID_MAX_LEN + 2];
+ uint8_t userclass[USERCLASS_MAX_LEN + 2];
+ uint8_t vendor[VENDOR_MAX_LEN + 2];
size_t blacklist_len;
in_addr_t *blacklist;