summaryrefslogtreecommitdiff
path: root/server/omapi.c
diff options
context:
space:
mode:
authorEvan Hunt <each@isc.org>2008-03-07 20:12:44 +0000
committerEvan Hunt <each@isc.org>2008-03-07 20:12:44 +0000
commitc40e954c55afb8252b87ce4405fe786cab6daed3 (patch)
tree58fa51e558e079a5a8a6bd43f335ebc7ac51334c /server/omapi.c
parente6270e4f99230580342af9a94eb61b969a8723e0 (diff)
downloadisc-dhcp-c40e954c55afb8252b87ce4405fe786cab6daed3.tar.gz
Check whether files are zero length before parsing them [rt17757]
Diffstat (limited to 'server/omapi.c')
-rw-r--r--server/omapi.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/omapi.c b/server/omapi.c
index 96541c29..4420e81d 100644
--- a/server/omapi.c
+++ b/server/omapi.c
@@ -1067,12 +1067,13 @@ isc_result_t dhcp_host_set_value (omapi_object_t *h,
struct parse *parse;
int lose = 0;
parse = (struct parse *)0;
- status = new_parse (&parse, -1,
- (char *)value -> u.buffer.value,
- value -> u.buffer.len,
+ 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
(&host -> group -> statements, parse, &lose,
context_any))) {