diff options
author | Jeremy Allison <jra@samba.org> | 2006-03-08 20:07:24 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:11:08 -0500 |
commit | b05af765418fe6054f2443ecbb4a556c5882a8c7 (patch) | |
tree | e054b3d3d11db2424401a261e395497be92aea2e | |
parent | d8ba987bfe202a4b0676c26cfc6a37a09b897ebf (diff) | |
download | samba-b05af765418fe6054f2443ecbb4a556c5882a8c7.tar.gz samba-b05af765418fe6054f2443ecbb4a556c5882a8c7.tar.bz2 samba-b05af765418fe6054f2443ecbb4a556c5882a8c7.zip |
r14047: Coverity fix #17. Ensure srv_name and info cannot
be zero before deref.
Jeremy.
(This used to be commit fbf9db6624d9584a26ae302df3c76555bbd2bb1e)
-rw-r--r-- | source3/rpc_parse/parse_spoolss.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index 5a308bc77d..f79731fea2 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -5061,6 +5061,10 @@ BOOL make_spoolss_q_addprinterdriver(TALLOC_CTX *mem_ctx, { DEBUG(5,("make_spoolss_q_addprinterdriver\n")); + if (!srv_name || !info) { + return False; + } + q_u->server_name_ptr = (srv_name!=NULL)?1:0; init_unistr2(&q_u->server_name, srv_name, UNI_STR_TERMINATE); |