2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 22:35:25 +00:00

Check whether files are zero length before parsing them [rt17757]

This commit is contained in:
Evan Hunt
2008-03-07 20:12:44 +00:00
parent e6270e4f99
commit c40e954c55
8 changed files with 91 additions and 63 deletions

View File

@@ -174,12 +174,12 @@ isc_result_t dhcp_group_set_value (omapi_object_t *h,
value -> type == omapi_datatype_string) {
struct parse *parse;
int lose = 0;
parse = (struct parse *)0;
status = new_parse (&parse, -1,
(char *)value -> u.buffer.value,
value -> u.buffer.len,
parse = NULL;
status = new_parse(&parse, -1,
(char *) value->u.buffer.value,
value->u.buffer.len,
"network client", 0);
if (status != ISC_R_SUCCESS)
if (status != ISC_R_SUCCESS || parse == NULL)
return status;
if (!(parse_executable_statements
(&group -> group -> statements, parse, &lose,