From b05af765418fe6054f2443ecbb4a556c5882a8c7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 8 Mar 2006 20:07:24 +0000 Subject: r14047: Coverity fix #17. Ensure srv_name and info cannot be zero before deref. Jeremy. (This used to be commit fbf9db6624d9584a26ae302df3c76555bbd2bb1e) --- source3/rpc_parse/parse_spoolss.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit