Fixed findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
dhcp-4.4.3-P1/keama/confparse.c:4207:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
dhcp-4.4.3-P1/keama/confparse.c:4175:12: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/keama/confparse.c:4177:16: branch_false: ...to here
dhcp-4.4.3-P1/keama/confparse.c:4191:12: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/keama/confparse.c:4192:14: branch_false: ...to here
dhcp-4.4.3-P1/keama/confparse.c:4191:13: branch_false: following ‘false’ branch (when the strings are equal)...
dhcp-4.4.3-P1/keama/confparse.c:4196:17: branch_false: ...to here
dhcp-4.4.3-P1/keama/confparse.c:4197:12: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/keama/confparse.c:4199:17: branch_false: ...to here
dhcp-4.4.3-P1/keama/confparse.c:4200:12: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/keama/confparse.c:4202:26: branch_false: ...to here
dhcp-4.4.3-P1/keama/confparse.c:4207:12: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/keama/confparse.c:4207:43: branch_true: ...to here
dhcp-4.4.3-P1/keama/confparse.c:4207:43: danger: dereference of NULL ‘0’
# 4205|   	datatype = convert_format(val, &is_array, &encapsulate);
# 4206|   
# 4207|-> 	if ((datatype == NULL) && (strchr(datatype->content, '?') != NULL))
# 4208|   		parse_error(cfile, "failed to convert format \"%s\" for "
# 4209|   			    "option %s.%s code %u",

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
dhcp-4.4.3-P1/keama/confparse.c:4366:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
dhcp-4.4.3-P1/keama/confparse.c:4327:12: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/keama/confparse.c:4331:25: branch_false: ...to here
dhcp-4.4.3-P1/keama/confparse.c:4366:12: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/keama/confparse.c:4366:43: branch_true: ...to here
dhcp-4.4.3-P1/keama/confparse.c:4366:43: danger: dereference of NULL ‘0’
# 4364|   	datatype = convert_format(option->format, &is_array, &encapsulate);
# 4365|   
# 4366|-> 	if ((datatype == NULL) && (strchr(datatype->content, '?') != NULL))
# 4367|   		parse_error(cfile, "failed to convert format \"%s\" for "
# 4368|   			    "option %s.%s code %u",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
dhcp-4.4.3-P1/keama/data.c:52:34: warning[-Wanalyzer-malloc-leak]: leak of ‘allocString()’
dhcp-4.4.3-P1/keama/data.c:1234:1: enter_function: entry to ‘hexaValue’
dhcp-4.4.3-P1/keama/data.c:1238:9: branch_true: following ‘true’ branch (when ‘s’ is non-NULL)...
dhcp-4.4.3-P1/keama/data.c:1239:9: branch_true: ...to here
dhcp-4.4.3-P1/keama/data.c:1239:9: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/keama/data.c:1241:13: branch_true: ...to here
dhcp-4.4.3-P1/keama/data.c:1241:13: call_function: calling ‘stringValue’ from ‘hexaValue’
dhcp-4.4.3-P1/keama/data.c:1241:13: return_function: returning to ‘hexaValue’ from ‘stringValue’
dhcp-4.4.3-P1/keama/data.c:1242:9: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/keama/data.c:1245:42: branch_true: ...to here
dhcp-4.4.3-P1/keama/data.c:1245:16: call_function: calling ‘makeString’ from ‘hexaValue’
#   50|   		result->length = strlen(s);
#   51|   	else
#   52|-> 		result->length = (size_t)l;
#   53|   	if (result->length > 0) {
#   54|   		result->content = (char *)malloc(result->length + 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
dhcp-4.4.3-P1/keama/data.c:53:13: warning[-Wanalyzer-malloc-leak]: leak of ‘allocString()’
dhcp-4.4.3-P1/keama/data.c:1249:1: enter_function: entry to ‘createHexa’
dhcp-4.4.3-P1/keama/data.c:1253:9: branch_true: following ‘true’ branch (when ‘h’ is non-NULL)...
dhcp-4.4.3-P1/keama/data.c:1255:13: branch_true: ...to here
dhcp-4.4.3-P1/keama/data.c:1255:13: call_function: calling ‘makeString’ from ‘createHexa’
#   51|   	else
#   52|   		result->length = (size_t)l;
#   53|-> 	if (result->length > 0) {
#   54|   		result->content = (char *)malloc(result->length + 1);
#   55|   		assert(result->content != NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
dhcp-4.4.3-P1/keama/data.c:335:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
dhcp-4.4.3-P1/keama/data.c:1249:1: enter_function: entry to ‘createHexa’
dhcp-4.4.3-P1/keama/data.c:1253:9: branch_true: following ‘true’ branch (when ‘h’ is non-NULL)...
dhcp-4.4.3-P1/keama/data.c:1255:13: branch_true: ...to here
dhcp-4.4.3-P1/keama/data.c:1255:13: call_function: calling ‘makeString’ from ‘createHexa’
dhcp-4.4.3-P1/keama/data.c:1255:13: return_function: returning to ‘createHexa’ from ‘makeString’
dhcp-4.4.3-P1/keama/data.c:1256:9: call_function: calling ‘concatString’ from ‘createHexa’
#  333|   	assert(a != NULL);
#  334|   
#  335|-> 	s->content = (char *)realloc(s->content, s->length + a->length + 1);
#  336|   	assert(s->content != NULL);
#  337|   	memcpy(s->content + s->length, a->content, a->length);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
dhcp-4.4.3-P1/keama/data.c:1257:16: warning[-Wanalyzer-malloc-leak]: leak of ‘makeString(-1, "0x")’
dhcp-4.4.3-P1/keama/data.c:1249:1: enter_function: entry to ‘createHexa’
dhcp-4.4.3-P1/keama/data.c:1253:9: branch_true: following ‘true’ branch (when ‘h’ is non-NULL)...
dhcp-4.4.3-P1/keama/data.c:1255:13: branch_true: ...to here
dhcp-4.4.3-P1/keama/data.c:1255:13: call_function: calling ‘makeString’ from ‘createHexa’
dhcp-4.4.3-P1/keama/data.c:1255:13: return_function: returning to ‘createHexa’ from ‘makeString’
dhcp-4.4.3-P1/keama/data.c:1256:9: call_function: calling ‘concatString’ from ‘createHexa’
dhcp-4.4.3-P1/keama/data.c:1256:9: return_function: returning to ‘createHexa’ from ‘concatString’
dhcp-4.4.3-P1/keama/data.c:1257:16: call_function: inlined call to ‘createString’ from ‘createHexa’
dhcp-4.4.3-P1/keama/data.c:1257:16: call_function: inlined call to ‘createString’ from ‘createHexa’
dhcp-4.4.3-P1/keama/data.c:1257:16: danger: ‘makeString(-1, "0x")’ leaks here; was allocated at [(8)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/7)
# 1255|   	s = makeString(-1, "0x");
# 1256|   	concatString(s, h);
# 1257|-> 	return createString(s);
# 1258|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
dhcp-4.4.3-P1/keama/json.c:148:31: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
dhcp-4.4.3-P1/keama/json.c:120:1: enter_function: entry to ‘json_map_parse’
dhcp-4.4.3-P1/keama/json.c:142:28: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/keama/json.c:144:33: branch_false: ...to here
dhcp-4.4.3-P1/keama/json.c:145:28: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/keama/json.c:148:31: branch_false: ...to here
dhcp-4.4.3-P1/keama/json.c:150:28: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/keama/json.c:153:32: branch_false: ...to here
dhcp-4.4.3-P1/keama/json.c:153:32: call_function: calling ‘json_parse’ from ‘json_map_parse’
#  146|   				parse_error(cfile, "unexpected %s, "
#  147|   					    "expected \"key\":value", val);
#  148|-> 			key = strdup(val);
#  149|   			token = next_token(&val, NULL, cfile);
#  150|   			if (token != COLON)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
dhcp-4.4.3-P1/keama/json.c:161:31: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
dhcp-4.4.3-P1/keama/json.c:120:1: enter_function: entry to ‘json_map_parse’
dhcp-4.4.3-P1/keama/json.c:142:28: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/keama/json.c:144:33: branch_false: ...to here
dhcp-4.4.3-P1/keama/json.c:145:28: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/keama/json.c:148:31: branch_false: ...to here
dhcp-4.4.3-P1/keama/json.c:150:28: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/keama/json.c:153:32: branch_false: ...to here
dhcp-4.4.3-P1/keama/json.c:153:32: call_function: calling ‘json_parse’ from ‘json_map_parse’
#  159|   				parse_error(cfile, "unexpected \"%s\", "
#  160|   					    "expected ','", val);
#  161|-> 			key = strdup(val);
#  162|   			token = next_token(&val, NULL, cfile);
#  163|   			if (token != COLON)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
dhcp-4.4.3-P1/keama/json.c:181:16: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
dhcp-4.4.3-P1/keama/json.c:120:1: enter_function: entry to ‘json_map_parse’
dhcp-4.4.3-P1/keama/json.c:142:28: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/keama/json.c:144:33: branch_false: ...to here
dhcp-4.4.3-P1/keama/json.c:145:28: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/keama/json.c:148:31: branch_false: ...to here
dhcp-4.4.3-P1/keama/json.c:150:28: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/keama/json.c:153:32: branch_false: ...to here
dhcp-4.4.3-P1/keama/json.c:153:32: call_function: calling ‘json_parse’ from ‘json_map_parse’
#  179|   	skip_token(&val, NULL, cfile);
#  180|   	cfile->stack_top--;
#  181|-> 	return map;
#  182|   }

Error: CPPCHECK_WARNING (CWE-476): [#def10]
dhcp-4.4.3-P1/keama/parse.c:725: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: option
#  723|   			option = (struct option *)malloc(sizeof(*option));
#  724|   			/* DHCP code does not check allocation failure? */
#  725|-> 			memset(option, 0, sizeof(*option));
#  726|   			option->name = strdup(val);
#  727|   			option->space = space;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def11]
dhcp-4.4.3-P1/keama/parse.c:725:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘option’ where non-null expected
dhcp-4.4.3-P1/keama/parse.c:1566:1: enter_function: entry to ‘parse_executable_statements’
dhcp-4.4.3-P1/keama/parse.c:1576:17: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/keama/parse.c:1577:22: branch_false: ...to here
dhcp-4.4.3-P1/keama/parse.c:1577:22: call_function: calling ‘parse_executable_statement’ from ‘parse_executable_statements’
#argument 1 of ‘__builtin_memset’ must be non-null
#  723|   			option = (struct option *)malloc(sizeof(*option));
#  724|   			/* DHCP code does not check allocation failure? */
#  725|-> 			memset(option, 0, sizeof(*option));
#  726|   			option->name = strdup(val);
#  727|   			option->space = space;

Error: CPPCHECK_WARNING (CWE-476): [#def12]
dhcp-4.4.3-P1/keama/parse.c:726: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: option
#  724|   			/* DHCP code does not check allocation failure? */
#  725|   			memset(option, 0, sizeof(*option));
#  726|-> 			option->name = strdup(val);
#  727|   			option->space = space;
#  728|   			option->code = code;

Error: CPPCHECK_WARNING (CWE-476): [#def13]
dhcp-4.4.3-P1/keama/parse.c:727: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: option
#  725|   			memset(option, 0, sizeof(*option));
#  726|   			option->name = strdup(val);
#  727|-> 			option->space = space;
#  728|   			option->code = code;
#  729|   			/* Mark format as undefined */

Error: CPPCHECK_WARNING (CWE-476): [#def14]
dhcp-4.4.3-P1/keama/parse.c:728: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: option
#  726|   			option->name = strdup(val);
#  727|   			option->space = space;
#  728|-> 			option->code = code;
#  729|   			/* Mark format as undefined */
#  730|   			option->format = "u";

Error: CPPCHECK_WARNING (CWE-476): [#def15]
dhcp-4.4.3-P1/keama/parse.c:730: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: option
#  728|   			option->code = code;
#  729|   			/* Mark format as undefined */
#  730|-> 			option->format = "u";
#  731|   			push_option(option);
#  732|   		} else {

Error: CPPCHECK_WARNING (CWE-476): [#def16]
dhcp-4.4.3-P1/keama/parse.c:750: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: option
#  748|   		option = (struct option *)malloc(sizeof(*option));
#  749|   		/* DHCP code does not check allocation failure? */
#  750|-> 		memset(option, 0, sizeof(*option));
#  751|   		option->name = strdup(val);
#  752|   		option->space = space;

Error: CPPCHECK_WARNING (CWE-476): [#def17]
dhcp-4.4.3-P1/keama/parse.c:751: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: option
#  749|   		/* DHCP code does not check allocation failure? */
#  750|   		memset(option, 0, sizeof(*option));
#  751|-> 		option->name = strdup(val);
#  752|   		option->space = space;
#  753|   		/* Mark format as undefined */

Error: CPPCHECK_WARNING (CWE-476): [#def18]
dhcp-4.4.3-P1/keama/parse.c:752: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: option
#  750|   		memset(option, 0, sizeof(*option));
#  751|   		option->name = strdup(val);
#  752|-> 		option->space = space;
#  753|   		/* Mark format as undefined */
#  754|   		option->format = "u";

Error: CPPCHECK_WARNING (CWE-476): [#def19]
dhcp-4.4.3-P1/keama/parse.c:754: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: option
#  752|   		option->space = space;
#  753|   		/* Mark format as undefined */
#  754|-> 		option->format = "u";
#  755|   		push_option(option);
#  756|   	} else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
dhcp-4.4.3-P1/keama/parse.c:760:16: warning[-Wanalyzer-malloc-leak]: leak of ‘uname’
dhcp-4.4.3-P1/keama/parse.c:1566:1: enter_function: entry to ‘parse_executable_statements’
dhcp-4.4.3-P1/keama/parse.c:1576:17: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/keama/parse.c:1577:22: branch_false: ...to here
dhcp-4.4.3-P1/keama/parse.c:1577:22: call_function: calling ‘parse_executable_statement’ from ‘parse_executable_statements’
#  758|   			    val, space->old);
#  759|   
#  760|-> 	return option;
#  761|   }
#  762|   

Error: GCC_ANALYZER_WARNING (CWE-686): [#def21]
dhcp-4.4.3-P1/server/failover.c:4044:24: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘TIME’ {{aka ‘long int’}} for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4431:14: enter_function: entry to ‘dhcp_failover_send_state’
dhcp-4.4.3-P1/server/failover.c:4449:12: branch_false: following ‘false’ branch (when ‘link’ is non-NULL)...
dhcp-4.4.3-P1/server/failover.c:4450:14: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4451:13: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4454:18: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4454:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_state’ with 1 variadic argument
# 4042|   	if (info -> type == FT_DDNS || info -> type == FT_DDNS1) {
# 4043|   		count = info -> type == FT_DDNS ? 1 : 2;
# 4044|-> 		size = va_arg (va, int) + count;
# 4045|   	} else {
# 4046|   		/* Find out how many items in this list. */

Error: GCC_ANALYZER_WARNING (CWE-686): [#def22]
dhcp-4.4.3-P1/server/failover.c:4044:24: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘long unsigned int’ for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4539:14: enter_function: entry to ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4594:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4594:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 2 variadic arguments
# 4042|   	if (info -> type == FT_DDNS || info -> type == FT_DDNS1) {
# 4043|   		count = info -> type == FT_DDNS ? 1 : 2;
# 4044|-> 		size = va_arg (va, int) + count;
# 4045|   	} else {
# 4046|   		/* Find out how many items in this list. */

Error: GCC_ANALYZER_WARNING (CWE-686): [#def23]
dhcp-4.4.3-P1/server/failover.c:4050:33: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘TIME’ {{aka ‘long int’}} for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4431:14: enter_function: entry to ‘dhcp_failover_send_state’
dhcp-4.4.3-P1/server/failover.c:4449:12: branch_false: following ‘false’ branch (when ‘link’ is non-NULL)...
dhcp-4.4.3-P1/server/failover.c:4450:14: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4451:13: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4454:18: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4454:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_state’ with 1 variadic argument
# 4048|   			count = info -> num_present;
# 4049|   		else
# 4050|-> 			count = va_arg (va, int);
# 4051|   
# 4052|   		/* Figure out size. */

Error: GCC_ANALYZER_WARNING (CWE-686): [#def24]
dhcp-4.4.3-P1/server/failover.c:4050:33: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘long unsigned int’ for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4539:14: enter_function: entry to ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4594:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4594:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 2 variadic arguments
# 4048|   			count = info -> num_present;
# 4049|   		else
# 4050|-> 			count = va_arg (va, int);
# 4051|   
# 4052|   		/* Figure out size. */

Error: GCC_ANALYZER_WARNING (CWE-686): [#def25]
dhcp-4.4.3-P1/server/failover.c:4062:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘char *’ but received ‘TIME’ {{aka ‘long int’}} for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4431:14: enter_function: entry to ‘dhcp_failover_send_state’
dhcp-4.4.3-P1/server/failover.c:4449:12: branch_false: following ‘false’ branch (when ‘link’ is non-NULL)...
dhcp-4.4.3-P1/server/failover.c:4450:14: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4451:13: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4454:18: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4454:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_state’ with 1 variadic argument
# 4060|   		      case FT_TEXT_OR_BYTES:
# 4061|   		      case FT_TEXT:
# 4062|-> 			txt = va_arg (va, char *);
# 4063|   			size = count;
# 4064|   			break;

Error: GCC_ANALYZER_WARNING (CWE-686): [#def26]
dhcp-4.4.3-P1/server/failover.c:4062:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘char *’ but received ‘int’ for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4539:14: enter_function: entry to ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: branch_true: following ‘true’ branch (when ‘reason != 0’)...
dhcp-4.4.3-P1/server/failover.c:4590:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4590:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 1 variadic argument
# 4060|   		      case FT_TEXT_OR_BYTES:
# 4061|   		      case FT_TEXT:
# 4062|-> 			txt = va_arg (va, char *);
# 4063|   			size = count;
# 4064|   			break;

Error: GCC_ANALYZER_WARNING (CWE-686): [#def27]
dhcp-4.4.3-P1/server/failover.c:4062:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘char *’ but received ‘int’ for variadic argument 2 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4539:14: enter_function: entry to ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4586:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4586:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 2 variadic arguments
# 4060|   		      case FT_TEXT_OR_BYTES:
# 4061|   		      case FT_TEXT:
# 4062|-> 			txt = va_arg (va, char *);
# 4063|   			size = count;
# 4064|   			break;

Error: GCC_ANALYZER_WARNING (CWE-686): [#def28]
dhcp-4.4.3-P1/server/failover.c:4062:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘char *’ but received ‘long unsigned int’ for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4539:14: enter_function: entry to ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4594:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4594:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 2 variadic arguments
# 4060|   		      case FT_TEXT_OR_BYTES:
# 4061|   		      case FT_TEXT:
# 4062|-> 			txt = va_arg (va, char *);
# 4063|   			size = count;
# 4064|   			break;

Error: GCC_ANALYZER_WARNING (CWE-686): [#def29]
dhcp-4.4.3-P1/server/failover.c:4062:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘char *’ but received ‘u_int32_t’ {{aka ‘unsigned int’}} for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4483:14: enter_function: entry to ‘dhcp_failover_send_connect’
dhcp-4.4.3-P1/server/failover.c:4502:12: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4506:13: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connect’ with 1 variadic argument
# 4060|   		      case FT_TEXT_OR_BYTES:
# 4061|   		      case FT_TEXT:
# 4062|-> 			txt = va_arg (va, char *);
# 4063|   			size = count;
# 4064|   			break;

Error: GCC_ANALYZER_WARNING (CWE-686): [#def30]
dhcp-4.4.3-P1/server/failover.c:4062:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘char *’ but received ‘unsigned int’ for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4431:14: enter_function: entry to ‘dhcp_failover_send_state’
dhcp-4.4.3-P1/server/failover.c:4449:12: branch_false: following ‘false’ branch (when ‘link’ is non-NULL)...
dhcp-4.4.3-P1/server/failover.c:4450:14: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4451:13: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4454:18: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4454:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_state’ with 1 variadic argument
dhcp-4.4.3-P1/server/failover.c:4454:18: return_function: returning to ‘dhcp_failover_send_state’ from ‘dhcp_failover_make_option’
dhcp-4.4.3-P1/server/failover.c:4454:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_state’ with 1 variadic argument
dhcp-4.4.3-P1/server/failover.c:4454:18: return_function: returning to ‘dhcp_failover_send_state’ from ‘dhcp_failover_make_option’
dhcp-4.4.3-P1/server/failover.c:4454:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_state’ with 1 variadic argument
# 4060|   		      case FT_TEXT_OR_BYTES:
# 4061|   		      case FT_TEXT:
# 4062|-> 			txt = va_arg (va, char *);
# 4063|   			size = count;
# 4064|   			break;

Error: GCC_ANALYZER_WARNING (CWE-685): [#def31]
dhcp-4.4.3-P1/server/failover.c:4062:25: warning[-Wanalyzer-va-list-exhausted]: ‘va’ has no more arguments (1 consumed)
dhcp-4.4.3-P1/server/failover.c:4539:14: enter_function: entry to ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: branch_true: following ‘true’ branch (when ‘reason != 0’)...
dhcp-4.4.3-P1/server/failover.c:4590:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4590:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 1 variadic argument
# 4060|   		      case FT_TEXT_OR_BYTES:
# 4061|   		      case FT_TEXT:
# 4062|-> 			txt = va_arg (va, char *);
# 4063|   			size = count;
# 4064|   			break;

Error: GCC_ANALYZER_WARNING (CWE-686): [#def32]
dhcp-4.4.3-P1/server/failover.c:4067:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘unsigned int’ but received ‘long unsigned int’ for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4539:14: enter_function: entry to ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: return_function: returning to ‘dhcp_failover_send_connectack’ from ‘dhcp_failover_make_option’
dhcp-4.4.3-P1/server/failover.c:4562:13: call_function: calling ‘dhcp_failover_option_printf’ from ‘dhcp_failover_send_connectack’
# 4065|   
# 4066|   		      case FT_IPADDR:
# 4067|-> 			ilen = va_arg (va, unsigned);
# 4068|   			size = count * ilen;
# 4069|   			break;

Error: GCC_ANALYZER_WARNING (CWE-686): [#def33]
dhcp-4.4.3-P1/server/failover.c:4067:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘unsigned int’ but received ‘u_int8_t *’ {{aka ‘unsigned char *’}} for variadic argument 2 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4539:14: enter_function: entry to ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 1 variadic argument
dhcp-4.4.3-P1/server/failover.c:4562:13: return_function: returning to ‘dhcp_failover_send_connectack’ from ‘dhcp_failover_make_option’
dhcp-4.4.3-P1/server/failover.c:4562:13: call_function: calling ‘dhcp_failover_option_printf’ from ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: return_function: returning to ‘dhcp_failover_send_connectack’ from ‘dhcp_failover_option_printf’
dhcp-4.4.3-P1/server/failover.c:4562:13: branch_false: following ‘false’ branch (when ‘state’ is NULL)...
dhcp-4.4.3-P1/server/failover.c:4568:19: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4568:18: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4569:21: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4569:21: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 2 variadic arguments
# 4065|   
# 4066|   		      case FT_IPADDR:
# 4067|-> 			ilen = va_arg (va, unsigned);
# 4068|   			size = count * ilen;
# 4069|   			break;

Error: GCC_ANALYZER_WARNING (CWE-685): [#def34]
dhcp-4.4.3-P1/server/failover.c:4067:25: warning[-Wanalyzer-va-list-exhausted]: ‘va’ has no more arguments (1 consumed)
dhcp-4.4.3-P1/server/failover.c:4539:14: enter_function: entry to ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4594:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 2 variadic arguments
dhcp-4.4.3-P1/server/failover.c:4594:18: return_function: returning to ‘dhcp_failover_send_connectack’ from ‘dhcp_failover_make_option’
dhcp-4.4.3-P1/server/failover.c:4562:13: branch_true: following ‘true’ branch (when ‘reason != 0’)...
dhcp-4.4.3-P1/server/failover.c:4590:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4590:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 1 variadic argument
# 4065|   
# 4066|   		      case FT_IPADDR:
# 4067|-> 			ilen = va_arg (va, unsigned);
# 4068|   			size = count * ilen;
# 4069|   			break;

Error: GCC_ANALYZER_WARNING (CWE-686): [#def35]
dhcp-4.4.3-P1/server/failover.c:4119:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘unsigned int’ but received ‘TIME’ {{aka ‘long int’}} for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4431:14: enter_function: entry to ‘dhcp_failover_send_state’
dhcp-4.4.3-P1/server/failover.c:4449:12: branch_false: following ‘false’ branch (when ‘link’ is non-NULL)...
dhcp-4.4.3-P1/server/failover.c:4450:14: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4451:13: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4454:18: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4454:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_state’ with 1 variadic argument
# 4117|   	      case FT_UINT8:
# 4118|   		for (i = 0; i < count; i++) {
# 4119|-> 			val = va_arg (va, unsigned);
# 4120|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4121|   			/* %Audit% Cannot exceed 24 bytes. %2004.06.17,Safe% */

Error: GCC_ANALYZER_WARNING (CWE-686): [#def36]
dhcp-4.4.3-P1/server/failover.c:4119:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘unsigned int’ but received ‘long unsigned int’ for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4539:14: enter_function: entry to ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4594:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4594:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 2 variadic arguments
# 4117|   	      case FT_UINT8:
# 4118|   		for (i = 0; i < count; i++) {
# 4119|-> 			val = va_arg (va, unsigned);
# 4120|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4121|   			/* %Audit% Cannot exceed 24 bytes. %2004.06.17,Safe% */

Error: GCC_ANALYZER_WARNING (CWE-686): [#def37]
dhcp-4.4.3-P1/server/failover.c:4119:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘unsigned int’ but received ‘u_int8_t *’ {{aka ‘unsigned char *’}} for variadic argument 2 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4483:14: enter_function: entry to ‘dhcp_failover_send_connect’
dhcp-4.4.3-P1/server/failover.c:4502:12: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4506:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4524:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4524:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connect’ with 2 variadic arguments
# 4117|   	      case FT_UINT8:
# 4118|   		for (i = 0; i < count; i++) {
# 4119|-> 			val = va_arg (va, unsigned);
# 4120|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4121|   			/* %Audit% Cannot exceed 24 bytes. %2004.06.17,Safe% */

Error: GCC_ANALYZER_WARNING (CWE-685): [#def38]
dhcp-4.4.3-P1/server/failover.c:4119:25: warning[-Wanalyzer-va-list-exhausted]: ‘va’ has no more arguments (1 consumed)
dhcp-4.4.3-P1/server/failover.c:4610:14: enter_function: entry to ‘dhcp_failover_send_disconnect’
dhcp-4.4.3-P1/server/failover.c:4635:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_disconnect’ with 1 variadic argument
# 4117|   	      case FT_UINT8:
# 4118|   		for (i = 0; i < count; i++) {
# 4119|-> 			val = va_arg (va, unsigned);
# 4120|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4121|   			/* %Audit% Cannot exceed 24 bytes. %2004.06.17,Safe% */

Error: GCC_ANALYZER_WARNING (CWE-685): [#def39]
dhcp-4.4.3-P1/server/failover.c:4119:25: warning[-Wanalyzer-va-list-exhausted]: ‘va’ has no more arguments (2 consumed)
dhcp-4.4.3-P1/server/failover.c:4483:14: enter_function: entry to ‘dhcp_failover_send_connect’
dhcp-4.4.3-P1/server/failover.c:4502:12: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4506:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4524:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4524:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connect’ with 2 variadic arguments
# 4117|   	      case FT_UINT8:
# 4118|   		for (i = 0; i < count; i++) {
# 4119|-> 			val = va_arg (va, unsigned);
# 4120|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4121|   			/* %Audit% Cannot exceed 24 bytes. %2004.06.17,Safe% */

Error: GCC_ANALYZER_WARNING (CWE-686): [#def40]
dhcp-4.4.3-P1/server/failover.c:4131:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘u_int8_t *’ {{aka ‘unsigned char *’}} but received ‘TIME’ {{aka ‘long int’}} for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4431:14: enter_function: entry to ‘dhcp_failover_send_state’
dhcp-4.4.3-P1/server/failover.c:4449:12: branch_false: following ‘false’ branch (when ‘link’ is non-NULL)...
dhcp-4.4.3-P1/server/failover.c:4450:14: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4451:13: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4454:18: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4454:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_state’ with 1 variadic argument
# 4129|   	      case FT_IPADDR:
# 4130|   		for (i = 0; i < count; i++) {
# 4131|-> 			iaddr = va_arg (va, u_int8_t *);
# 4132|   			if (ilen != 4) {
# 4133|   				dfree (option.data, MDL);

Error: GCC_ANALYZER_WARNING (CWE-686): [#def41]
dhcp-4.4.3-P1/server/failover.c:4131:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘u_int8_t *’ {{aka ‘unsigned char *’}} but received ‘int’ for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4610:14: enter_function: entry to ‘dhcp_failover_send_disconnect’
dhcp-4.4.3-P1/server/failover.c:4635:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_disconnect’ with 1 variadic argument
# 4129|   	      case FT_IPADDR:
# 4130|   		for (i = 0; i < count; i++) {
# 4131|-> 			iaddr = va_arg (va, u_int8_t *);
# 4132|   			if (ilen != 4) {
# 4133|   				dfree (option.data, MDL);

Error: GCC_ANALYZER_WARNING (CWE-686): [#def42]
dhcp-4.4.3-P1/server/failover.c:4131:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘u_int8_t *’ {{aka ‘unsigned char *’}} but received ‘int’ for variadic argument 2 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4539:14: enter_function: entry to ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4586:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4586:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 2 variadic arguments
# 4129|   	      case FT_IPADDR:
# 4130|   		for (i = 0; i < count; i++) {
# 4131|-> 			iaddr = va_arg (va, u_int8_t *);
# 4132|   			if (ilen != 4) {
# 4133|   				dfree (option.data, MDL);

Error: GCC_ANALYZER_WARNING (CWE-686): [#def43]
dhcp-4.4.3-P1/server/failover.c:4131:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘u_int8_t *’ {{aka ‘unsigned char *’}} but received ‘long unsigned int’ for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4539:14: enter_function: entry to ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4594:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4594:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 2 variadic arguments
# 4129|   	      case FT_IPADDR:
# 4130|   		for (i = 0; i < count; i++) {
# 4131|-> 			iaddr = va_arg (va, u_int8_t *);
# 4132|   			if (ilen != 4) {
# 4133|   				dfree (option.data, MDL);

Error: GCC_ANALYZER_WARNING (CWE-686): [#def44]
dhcp-4.4.3-P1/server/failover.c:4131:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘u_int8_t *’ {{aka ‘unsigned char *’}} but received ‘u_int32_t’ {{aka ‘unsigned int’}} for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4483:14: enter_function: entry to ‘dhcp_failover_send_connect’
dhcp-4.4.3-P1/server/failover.c:4502:12: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4506:13: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connect’ with 1 variadic argument
# 4129|   	      case FT_IPADDR:
# 4130|   		for (i = 0; i < count; i++) {
# 4131|-> 			iaddr = va_arg (va, u_int8_t *);
# 4132|   			if (ilen != 4) {
# 4133|   				dfree (option.data, MDL);

Error: GCC_ANALYZER_WARNING (CWE-686): [#def45]
dhcp-4.4.3-P1/server/failover.c:4131:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘u_int8_t *’ {{aka ‘unsigned char *’}} but received ‘unsigned int’ for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4431:14: enter_function: entry to ‘dhcp_failover_send_state’
dhcp-4.4.3-P1/server/failover.c:4449:12: branch_false: following ‘false’ branch (when ‘link’ is non-NULL)...
dhcp-4.4.3-P1/server/failover.c:4450:14: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4451:13: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4454:18: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4454:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_state’ with 1 variadic argument
dhcp-4.4.3-P1/server/failover.c:4454:18: return_function: returning to ‘dhcp_failover_send_state’ from ‘dhcp_failover_make_option’
dhcp-4.4.3-P1/server/failover.c:4454:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_state’ with 1 variadic argument
dhcp-4.4.3-P1/server/failover.c:4454:18: return_function: returning to ‘dhcp_failover_send_state’ from ‘dhcp_failover_make_option’
dhcp-4.4.3-P1/server/failover.c:4454:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_state’ with 1 variadic argument
# 4129|   	      case FT_IPADDR:
# 4130|   		for (i = 0; i < count; i++) {
# 4131|-> 			iaddr = va_arg (va, u_int8_t *);
# 4132|   			if (ilen != 4) {
# 4133|   				dfree (option.data, MDL);

Error: GCC_ANALYZER_WARNING (CWE-685): [#def46]
dhcp-4.4.3-P1/server/failover.c:4131:25: warning[-Wanalyzer-va-list-exhausted]: ‘va’ has no more arguments (1 consumed)
dhcp-4.4.3-P1/server/failover.c:4610:14: enter_function: entry to ‘dhcp_failover_send_disconnect’
dhcp-4.4.3-P1/server/failover.c:4635:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_disconnect’ with 1 variadic argument
# 4129|   	      case FT_IPADDR:
# 4130|   		for (i = 0; i < count; i++) {
# 4131|-> 			iaddr = va_arg (va, u_int8_t *);
# 4132|   			if (ilen != 4) {
# 4133|   				dfree (option.data, MDL);

Error: GCC_ANALYZER_WARNING (CWE-685): [#def47]
dhcp-4.4.3-P1/server/failover.c:4131:25: warning[-Wanalyzer-va-list-exhausted]: ‘va’ has no more arguments (2 consumed)
dhcp-4.4.3-P1/server/failover.c:4483:14: enter_function: entry to ‘dhcp_failover_send_connect’
dhcp-4.4.3-P1/server/failover.c:4502:12: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4506:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4524:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4524:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connect’ with 2 variadic arguments
# 4129|   	      case FT_IPADDR:
# 4130|   		for (i = 0; i < count; i++) {
# 4131|-> 			iaddr = va_arg (va, u_int8_t *);
# 4132|   			if (ilen != 4) {
# 4133|   				dfree (option.data, MDL);

Error: GCC_ANALYZER_WARNING (CWE-686): [#def48]
dhcp-4.4.3-P1/server/failover.c:4152:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘unsigned int’ but received ‘TIME’ {{aka ‘long int’}} for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4431:14: enter_function: entry to ‘dhcp_failover_send_state’
dhcp-4.4.3-P1/server/failover.c:4449:12: branch_false: following ‘false’ branch (when ‘link’ is non-NULL)...
dhcp-4.4.3-P1/server/failover.c:4450:14: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4451:13: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4454:18: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4454:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_state’ with 1 variadic argument
# 4150|   	      case FT_UINT32:
# 4151|   		for (i = 0; i < count; i++) {
# 4152|-> 			val = va_arg (va, unsigned);
# 4153|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4154|   			/*%Audit% Cannot exceed 24 bytes.  %2004.06.17,Safe%*/

Error: GCC_ANALYZER_WARNING (CWE-686): [#def49]
dhcp-4.4.3-P1/server/failover.c:4152:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘unsigned int’ but received ‘long unsigned int’ for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4539:14: enter_function: entry to ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4594:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4594:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 2 variadic arguments
# 4150|   	      case FT_UINT32:
# 4151|   		for (i = 0; i < count; i++) {
# 4152|-> 			val = va_arg (va, unsigned);
# 4153|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4154|   			/*%Audit% Cannot exceed 24 bytes.  %2004.06.17,Safe%*/

Error: GCC_ANALYZER_WARNING (CWE-686): [#def50]
dhcp-4.4.3-P1/server/failover.c:4152:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘unsigned int’ but received ‘u_int8_t *’ {{aka ‘unsigned char *’}} for variadic argument 2 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4483:14: enter_function: entry to ‘dhcp_failover_send_connect’
dhcp-4.4.3-P1/server/failover.c:4502:12: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4506:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4524:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4524:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connect’ with 2 variadic arguments
# 4150|   	      case FT_UINT32:
# 4151|   		for (i = 0; i < count; i++) {
# 4152|-> 			val = va_arg (va, unsigned);
# 4153|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4154|   			/*%Audit% Cannot exceed 24 bytes.  %2004.06.17,Safe%*/

Error: GCC_ANALYZER_WARNING (CWE-685): [#def51]
dhcp-4.4.3-P1/server/failover.c:4152:25: warning[-Wanalyzer-va-list-exhausted]: ‘va’ has no more arguments (1 consumed)
dhcp-4.4.3-P1/server/failover.c:4539:14: enter_function: entry to ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: branch_true: following ‘true’ branch (when ‘reason != 0’)...
dhcp-4.4.3-P1/server/failover.c:4590:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4590:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 1 variadic argument
# 4150|   	      case FT_UINT32:
# 4151|   		for (i = 0; i < count; i++) {
# 4152|-> 			val = va_arg (va, unsigned);
# 4153|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4154|   			/*%Audit% Cannot exceed 24 bytes.  %2004.06.17,Safe%*/

Error: GCC_ANALYZER_WARNING (CWE-685): [#def52]
dhcp-4.4.3-P1/server/failover.c:4152:25: warning[-Wanalyzer-va-list-exhausted]: ‘va’ has no more arguments (2 consumed)
dhcp-4.4.3-P1/server/failover.c:4483:14: enter_function: entry to ‘dhcp_failover_send_connect’
dhcp-4.4.3-P1/server/failover.c:4502:12: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4506:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4524:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4524:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connect’ with 2 variadic arguments
# 4150|   	      case FT_UINT32:
# 4151|   		for (i = 0; i < count; i++) {
# 4152|-> 			val = va_arg (va, unsigned);
# 4153|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4154|   			/*%Audit% Cannot exceed 24 bytes.  %2004.06.17,Safe%*/

Error: GCC_ANALYZER_WARNING (CWE-686): [#def53]
dhcp-4.4.3-P1/server/failover.c:4164:17: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘u_int8_t *’ {{aka ‘unsigned char *’}} but received ‘TIME’ {{aka ‘long int’}} for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4431:14: enter_function: entry to ‘dhcp_failover_send_state’
dhcp-4.4.3-P1/server/failover.c:4449:12: branch_false: following ‘false’ branch (when ‘link’ is non-NULL)...
dhcp-4.4.3-P1/server/failover.c:4450:14: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4451:13: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4454:18: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4454:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_state’ with 1 variadic argument
# 4162|   	      case FT_BYTES:
# 4163|   	      case FT_DIGEST:
# 4164|-> 		bval = va_arg (va, u_int8_t *);
# 4165|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4166|   		for (i = 0; i < count; i++) {

Error: GCC_ANALYZER_WARNING (CWE-686): [#def54]
dhcp-4.4.3-P1/server/failover.c:4164:17: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘u_int8_t *’ {{aka ‘unsigned char *’}} but received ‘int’ for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4610:14: enter_function: entry to ‘dhcp_failover_send_disconnect’
dhcp-4.4.3-P1/server/failover.c:4635:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_disconnect’ with 1 variadic argument
# 4162|   	      case FT_BYTES:
# 4163|   	      case FT_DIGEST:
# 4164|-> 		bval = va_arg (va, u_int8_t *);
# 4165|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4166|   		for (i = 0; i < count; i++) {

Error: GCC_ANALYZER_WARNING (CWE-686): [#def55]
dhcp-4.4.3-P1/server/failover.c:4164:17: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘u_int8_t *’ {{aka ‘unsigned char *’}} but received ‘int’ for variadic argument 2 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4539:14: enter_function: entry to ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4586:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4586:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 2 variadic arguments
# 4162|   	      case FT_BYTES:
# 4163|   	      case FT_DIGEST:
# 4164|-> 		bval = va_arg (va, u_int8_t *);
# 4165|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4166|   		for (i = 0; i < count; i++) {

Error: GCC_ANALYZER_WARNING (CWE-686): [#def56]
dhcp-4.4.3-P1/server/failover.c:4164:17: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘u_int8_t *’ {{aka ‘unsigned char *’}} but received ‘long unsigned int’ for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4539:14: enter_function: entry to ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4594:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4594:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 2 variadic arguments
# 4162|   	      case FT_BYTES:
# 4163|   	      case FT_DIGEST:
# 4164|-> 		bval = va_arg (va, u_int8_t *);
# 4165|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4166|   		for (i = 0; i < count; i++) {

Error: GCC_ANALYZER_WARNING (CWE-686): [#def57]
dhcp-4.4.3-P1/server/failover.c:4164:17: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘u_int8_t *’ {{aka ‘unsigned char *’}} but received ‘u_int32_t’ {{aka ‘unsigned int’}} for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4483:14: enter_function: entry to ‘dhcp_failover_send_connect’
dhcp-4.4.3-P1/server/failover.c:4502:12: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4506:13: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connect’ with 1 variadic argument
# 4162|   	      case FT_BYTES:
# 4163|   	      case FT_DIGEST:
# 4164|-> 		bval = va_arg (va, u_int8_t *);
# 4165|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4166|   		for (i = 0; i < count; i++) {

Error: GCC_ANALYZER_WARNING (CWE-686): [#def58]
dhcp-4.4.3-P1/server/failover.c:4164:17: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘u_int8_t *’ {{aka ‘unsigned char *’}} but received ‘unsigned int’ for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4431:14: enter_function: entry to ‘dhcp_failover_send_state’
dhcp-4.4.3-P1/server/failover.c:4449:12: branch_false: following ‘false’ branch (when ‘link’ is non-NULL)...
dhcp-4.4.3-P1/server/failover.c:4450:14: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4451:13: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4454:18: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4454:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_state’ with 1 variadic argument
dhcp-4.4.3-P1/server/failover.c:4454:18: return_function: returning to ‘dhcp_failover_send_state’ from ‘dhcp_failover_make_option’
dhcp-4.4.3-P1/server/failover.c:4454:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_state’ with 1 variadic argument
dhcp-4.4.3-P1/server/failover.c:4454:18: return_function: returning to ‘dhcp_failover_send_state’ from ‘dhcp_failover_make_option’
dhcp-4.4.3-P1/server/failover.c:4454:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_state’ with 1 variadic argument
# 4162|   	      case FT_BYTES:
# 4163|   	      case FT_DIGEST:
# 4164|-> 		bval = va_arg (va, u_int8_t *);
# 4165|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4166|   		for (i = 0; i < count; i++) {

Error: GCC_ANALYZER_WARNING (CWE-685): [#def59]
dhcp-4.4.3-P1/server/failover.c:4164:17: warning[-Wanalyzer-va-list-exhausted]: ‘va’ has no more arguments (1 consumed)
dhcp-4.4.3-P1/server/failover.c:4610:14: enter_function: entry to ‘dhcp_failover_send_disconnect’
dhcp-4.4.3-P1/server/failover.c:4635:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_disconnect’ with 1 variadic argument
# 4162|   	      case FT_BYTES:
# 4163|   	      case FT_DIGEST:
# 4164|-> 		bval = va_arg (va, u_int8_t *);
# 4165|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4166|   		for (i = 0; i < count; i++) {

Error: GCC_ANALYZER_WARNING (CWE-685): [#def60]
dhcp-4.4.3-P1/server/failover.c:4164:17: warning[-Wanalyzer-va-list-exhausted]: ‘va’ has no more arguments (2 consumed)
dhcp-4.4.3-P1/server/failover.c:4483:14: enter_function: entry to ‘dhcp_failover_send_connect’
dhcp-4.4.3-P1/server/failover.c:4502:12: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4506:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4524:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4524:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connect’ with 2 variadic arguments
# 4162|   	      case FT_BYTES:
# 4163|   	      case FT_DIGEST:
# 4164|-> 		bval = va_arg (va, u_int8_t *);
# 4165|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4166|   		for (i = 0; i < count; i++) {

Error: GCC_ANALYZER_WARNING (CWE-686): [#def61]
dhcp-4.4.3-P1/server/failover.c:4198:35: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘unsigned int’ but received ‘TIME’ {{aka ‘long int’}} for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4431:14: enter_function: entry to ‘dhcp_failover_send_state’
dhcp-4.4.3-P1/server/failover.c:4449:12: branch_false: following ‘false’ branch (when ‘link’ is non-NULL)...
dhcp-4.4.3-P1/server/failover.c:4450:14: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4451:13: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4454:18: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4454:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_state’ with 1 variadic argument
# 4196|   	      case FT_DDNS:
# 4197|   	      case FT_DDNS1:
# 4198|-> 		option.data [4] = va_arg (va, unsigned);
# 4199|   		if (count == 2)
# 4200|   			option.data [5] = va_arg (va, unsigned);

Error: GCC_ANALYZER_WARNING (CWE-686): [#def62]
dhcp-4.4.3-P1/server/failover.c:4198:35: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘unsigned int’ but received ‘long unsigned int’ for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4539:14: enter_function: entry to ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4594:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4594:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 2 variadic arguments
# 4196|   	      case FT_DDNS:
# 4197|   	      case FT_DDNS1:
# 4198|-> 		option.data [4] = va_arg (va, unsigned);
# 4199|   		if (count == 2)
# 4200|   			option.data [5] = va_arg (va, unsigned);

Error: GCC_ANALYZER_WARNING (CWE-686): [#def63]
dhcp-4.4.3-P1/server/failover.c:4198:35: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘unsigned int’ but received ‘u_int8_t *’ {{aka ‘unsigned char *’}} for variadic argument 2 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4483:14: enter_function: entry to ‘dhcp_failover_send_connect’
dhcp-4.4.3-P1/server/failover.c:4502:12: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4506:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4524:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4524:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connect’ with 2 variadic arguments
# 4196|   	      case FT_DDNS:
# 4197|   	      case FT_DDNS1:
# 4198|-> 		option.data [4] = va_arg (va, unsigned);
# 4199|   		if (count == 2)
# 4200|   			option.data [5] = va_arg (va, unsigned);

Error: GCC_ANALYZER_WARNING (CWE-685): [#def64]
dhcp-4.4.3-P1/server/failover.c:4198:35: warning[-Wanalyzer-va-list-exhausted]: ‘va’ has no more arguments (1 consumed)
dhcp-4.4.3-P1/server/failover.c:4539:14: enter_function: entry to ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: branch_true: following ‘true’ branch (when ‘reason != 0’)...
dhcp-4.4.3-P1/server/failover.c:4590:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4590:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 1 variadic argument
# 4196|   	      case FT_DDNS:
# 4197|   	      case FT_DDNS1:
# 4198|-> 		option.data [4] = va_arg (va, unsigned);
# 4199|   		if (count == 2)
# 4200|   			option.data [5] = va_arg (va, unsigned);

Error: GCC_ANALYZER_WARNING (CWE-685): [#def65]
dhcp-4.4.3-P1/server/failover.c:4198:35: warning[-Wanalyzer-va-list-exhausted]: ‘va’ has no more arguments (2 consumed)
dhcp-4.4.3-P1/server/failover.c:4483:14: enter_function: entry to ‘dhcp_failover_send_connect’
dhcp-4.4.3-P1/server/failover.c:4502:12: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4506:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4524:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4524:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connect’ with 2 variadic arguments
# 4196|   	      case FT_DDNS:
# 4197|   	      case FT_DDNS1:
# 4198|-> 		option.data [4] = va_arg (va, unsigned);
# 4199|   		if (count == 2)
# 4200|   			option.data [5] = va_arg (va, unsigned);

Error: GCC_ANALYZER_WARNING (CWE-686): [#def66]
dhcp-4.4.3-P1/server/failover.c:4214:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘unsigned int’ but received ‘TIME’ {{aka ‘long int’}} for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4431:14: enter_function: entry to ‘dhcp_failover_send_state’
dhcp-4.4.3-P1/server/failover.c:4449:12: branch_false: following ‘false’ branch (when ‘link’ is non-NULL)...
dhcp-4.4.3-P1/server/failover.c:4450:14: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4451:13: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4449:13: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4454:18: branch_false: ...to here
dhcp-4.4.3-P1/server/failover.c:4454:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_state’ with 1 variadic argument
# 4212|   	      case FT_UINT16:
# 4213|   		for (i = 0; i < count; i++) {
# 4214|-> 			val = va_arg (va, u_int32_t);
# 4215|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4216|   			/*%Audit% Cannot exceed 24 bytes. %2004.06.17,Safe%*/

Error: GCC_ANALYZER_WARNING (CWE-686): [#def67]
dhcp-4.4.3-P1/server/failover.c:4214:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘unsigned int’ but received ‘long unsigned int’ for variadic argument 1 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4539:14: enter_function: entry to ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4594:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4594:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 2 variadic arguments
# 4212|   	      case FT_UINT16:
# 4213|   		for (i = 0; i < count; i++) {
# 4214|-> 			val = va_arg (va, u_int32_t);
# 4215|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4216|   			/*%Audit% Cannot exceed 24 bytes. %2004.06.17,Safe%*/

Error: GCC_ANALYZER_WARNING (CWE-686): [#def68]
dhcp-4.4.3-P1/server/failover.c:4214:25: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘unsigned int’ but received ‘u_int8_t *’ {{aka ‘unsigned char *’}} for variadic argument 2 of ‘va’
dhcp-4.4.3-P1/server/failover.c:4483:14: enter_function: entry to ‘dhcp_failover_send_connect’
dhcp-4.4.3-P1/server/failover.c:4502:12: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4506:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4524:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4524:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connect’ with 2 variadic arguments
# 4212|   	      case FT_UINT16:
# 4213|   		for (i = 0; i < count; i++) {
# 4214|-> 			val = va_arg (va, u_int32_t);
# 4215|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4216|   			/*%Audit% Cannot exceed 24 bytes. %2004.06.17,Safe%*/

Error: GCC_ANALYZER_WARNING (CWE-685): [#def69]
dhcp-4.4.3-P1/server/failover.c:4214:25: warning[-Wanalyzer-va-list-exhausted]: ‘va’ has no more arguments (1 consumed)
dhcp-4.4.3-P1/server/failover.c:4539:14: enter_function: entry to ‘dhcp_failover_send_connectack’
dhcp-4.4.3-P1/server/failover.c:4562:13: branch_true: following ‘true’ branch (when ‘reason != 0’)...
dhcp-4.4.3-P1/server/failover.c:4590:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4590:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connectack’ with 1 variadic argument
# 4212|   	      case FT_UINT16:
# 4213|   		for (i = 0; i < count; i++) {
# 4214|-> 			val = va_arg (va, u_int32_t);
# 4215|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4216|   			/*%Audit% Cannot exceed 24 bytes. %2004.06.17,Safe%*/

Error: GCC_ANALYZER_WARNING (CWE-685): [#def70]
dhcp-4.4.3-P1/server/failover.c:4214:25: warning[-Wanalyzer-va-list-exhausted]: ‘va’ has no more arguments (2 consumed)
dhcp-4.4.3-P1/server/failover.c:4483:14: enter_function: entry to ‘dhcp_failover_send_connect’
dhcp-4.4.3-P1/server/failover.c:4502:12: branch_false: following ‘false’ branch...
dhcp-4.4.3-P1/server/failover.c:4506:13: branch_true: following ‘true’ branch...
dhcp-4.4.3-P1/server/failover.c:4524:18: branch_true: ...to here
dhcp-4.4.3-P1/server/failover.c:4524:18: call_function: calling ‘dhcp_failover_make_option’ from ‘dhcp_failover_send_connect’ with 2 variadic arguments
# 4212|   	      case FT_UINT16:
# 4213|   		for (i = 0; i < count; i++) {
# 4214|-> 			val = va_arg (va, u_int32_t);
# 4215|   #if defined (DEBUG_FAILOVER_MESSAGES)
# 4216|   			/*%Audit% Cannot exceed 24 bytes. %2004.06.17,Safe%*/

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.86.0
diffbase-analyzer-version-cppcheck2.17.1
diffbase-analyzer-version-gcc15.0.1
diffbase-analyzer-version-gcc-analyzer15.0.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-71.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namedhcp-4.4.3-21.fc43
diffbase-store-results-to/tmp/tmpp5p_iyda/dhcp-4.4.3-21.fc43.tar.xz
diffbase-time-created2025-04-25 12:28:43
diffbase-time-finished2025-04-25 12:36:36
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpp5p_iyda/dhcp-4.4.3-21.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpp5p_iyda/dhcp-4.4.3-21.fc43.src.rpm'
diffbase-tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-71.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namedhcp-4.4.3-16.P1.fc42
store-results-to/tmp/tmp965r5t2a/dhcp-4.4.3-16.P1.fc42.tar.xz
time-created2025-04-25 12:17:02
time-finished2025-04-25 12:28:22
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp965r5t2a/dhcp-4.4.3-16.P1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp965r5t2a/dhcp-4.4.3-16.P1.fc42.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9