summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_lsa.c2
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_lsa.c b/source3/rpc_server/srv_lsa.c
index aea7294ffe..5fc40d692c 100644
--- a/source3/rpc_server/srv_lsa.c
+++ b/source3/rpc_server/srv_lsa.c
@@ -88,7 +88,7 @@ Init dom_query
static void init_dom_query(DOM_QUERY *d_q, char *dom_name, DOM_SID *dom_sid)
{
- int domlen = (dom_name != NULL) ? strlen(dom_name) : 0;
+ int domlen = (dom_name != NULL) ? strlen(dom_name)+1 : 0;
d_q->uni_dom_max_len = domlen * 2;
d_q->uni_dom_str_len = domlen * 2;
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index c2054143b7..a4f5e257f1 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -2021,7 +2021,7 @@ static DEVICEMODE *construct_dev_mode(int snum)
DEBUGADD(8,("loading DEVICEMODE\n"));
- safe_strcpy(adevice, printer->info_2->printername, sizeof(adevice));
+ snprintf(adevice, sizeof(adevice), printer->info_2->printername);
init_unistr(&devmode->devicename, adevice);
snprintf(aform, sizeof(aform), ntdevmode->formname);