We must ZERO_STRUCT before using the buffer in copy_unistr2.
authorJeremy Allison <jra@samba.org>
Fri, 12 Jul 2002 18:10:24 +0000 (18:10 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 12 Jul 2002 18:10:24 +0000 (18:10 +0000)
Fixes addprinterdriverex.
Jeremy.
(This used to be commit d3c73e59708eeb1ee4642fb31fcfc0ec2fd28070)

source3/rpc_server/srv_spoolss_nt.c

index 32b2dc8b9e4068ed34c993d6dbd8e4dd7f9d07ef..68c792f8b0713f77c83523ef54ca085106e2306e 100644 (file)
@@ -6953,6 +6953,9 @@ WERROR _spoolss_addprinterdriverex(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVEREX *
                return WERR_ACCESS_DENIED;
        
        /* just pass the information off to _spoolss_addprinterdriver() */
+       ZERO_STRUCT(q_u_local);
+       ZERO_STRUCT(r_u_local);
+
        q_u_local.server_name_ptr = q_u->server_name_ptr;
        copy_unistr2(&q_u_local.server_name, &q_u->server_name);
        q_u_local.level = q_u->level;