summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_winreg_nt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_winreg_nt.c b/source3/rpc_server/srv_winreg_nt.c
index a892a9bb8d..1a130f19b6 100644
--- a/source3/rpc_server/srv_winreg_nt.c
+++ b/source3/rpc_server/srv_winreg_nt.c
@@ -689,12 +689,14 @@ WERROR _winreg_InitiateSystemShutdownEx(pipes_struct *p, uint16_t *hostname, str
/* pull the message string and perform necessary sanity checks on it */
+ chkmsg[0] = '\0';
+
if ( message && message->name && message->name->name ) {
if ( (msg = talloc_strdup(p->mem_ctx, message->name->name )) == NULL ) {
return WERR_NOMEM;
}
+ alpha_strcpy (chkmsg, msg, NULL, sizeof(chkmsg));
}
- alpha_strcpy (chkmsg, msg?msg:"", NULL, strlen(msg));
fstr_sprintf(str_timeout, "%d", timeout);
fstr_sprintf(r, reboot ? SHUTDOWN_R_STRING : "");