diff options
author | Andreas Schneider <asn@samba.org> | 2012-12-17 15:31:21 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2012-12-21 13:56:01 +0100 |
commit | 72e02c73b64f1ff56b2d53ec63d68486a4f1ff90 (patch) | |
tree | 4e42320f169221e776b12e532c24fdde2eb0c22f /source3 | |
parent | f0454ffb69d93daafd350e6021f953586c5374bd (diff) | |
download | samba-72e02c73b64f1ff56b2d53ec63d68486a4f1ff90.tar.gz samba-72e02c73b64f1ff56b2d53ec63d68486a4f1ff90.tar.bz2 samba-72e02c73b64f1ff56b2d53ec63d68486a4f1ff90.zip |
s3-rpc_server: Fix a possible null pointer dereference.
This variable can be set to NULL in an earlier function call.
Found by Coverity.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_server/spoolss/srv_spoolss_nt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c index b8ee9f4072..531b2898ab 100644 --- a/source3/rpc_server/spoolss/srv_spoolss_nt.c +++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c @@ -4428,7 +4428,8 @@ static WERROR enum_all_printers_info_1_name(TALLOC_CTX *mem_ctx, DEBUG(4,("enum_all_printers_info_1_name\n")); - if ((servername[0] == '\\') && (servername[1] == '\\')) { + if (servername != NULL && + (servername[0] == '\\') && (servername[1] == '\\')) { s = servername + 2; } |