Blob Blame History Raw
From 3e8ed78bf1b2649b13129327700d5d55bd2040e2 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk>
Date: Wed, 29 May 2013 14:31:33 +0100
Subject: [PATCH 1/1] Fix option parsing for --dhcp-host.

---
 src/option.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/option.c b/src/option.c
index eb71102..ac54c31 100644
--- a/src/option.c
+++ b/src/option.c
@@ -2510,7 +2510,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
     case 'G':  /* --dhcp-host */
       {
 	int j, k = 0;
-	char *a[6] = { NULL, NULL, NULL, NULL, NULL, NULL };
+	char *a[7] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
 	struct dhcp_config *new;
 	struct in_addr in;
 	
@@ -2522,7 +2522,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
 	new->netid = NULL;
 
 	if ((a[0] = arg))
-	  for (k = 1; k < 6; k++)
+	  for (k = 1; k < 7; k++)
 	    if (!(a[k] = split(a[k-1])))
 	      break;
 	
-- 
1.7.2.5