summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/svcctl/srv_svcctl_reg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/rpc_server/svcctl/srv_svcctl_reg.c b/source3/rpc_server/svcctl/srv_svcctl_reg.c
index 930c327622..07b7ce6d4b 100644
--- a/source3/rpc_server/svcctl/srv_svcctl_reg.c
+++ b/source3/rpc_server/svcctl/srv_svcctl_reg.c
@@ -224,13 +224,13 @@ static bool read_init_file(TALLOC_CTX *mem_ctx,
p = strstr(str, "Description:");
if (p != NULL) {
char *desc;
+ size_t len = strlen(p);
- p += strlen( "Description:" ) + 1;
- if (p == NULL) {
+ if (len <= 12) {
break;
}
- desc = svcctl_cleanup_string(mem_ctx, p);
+ desc = svcctl_cleanup_string(mem_ctx, p + 12);
if (desc != NULL) {
info->description = talloc_strdup(info, desc);
}