svn commit: samba r14831 - in branches/SAMBA_3_0/source/utils: .
jra at samba.org
jra at samba.org
Fri Mar 31 00:47:09 GMT 2006
Author: jra
Date: 2006-03-31 00:47:08 +0000 (Fri, 31 Mar 2006)
New Revision: 14831
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14831
Log:
Fix possible null deref. Coverity #279.
Jeremy.
Modified:
branches/SAMBA_3_0/source/utils/net_ads.c
Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_ads.c
===================================================================
--- branches/SAMBA_3_0/source/utils/net_ads.c 2006-03-31 00:44:32 UTC (rev 14830)
+++ branches/SAMBA_3_0/source/utils/net_ads.c 2006-03-31 00:47:08 UTC (rev 14831)
@@ -1045,6 +1045,13 @@
asprintf(&prt_dn, "cn=%s-%s,%s", srv_cn[0], printername, srv_dn);
pipe_hnd = cli_rpc_pipe_open_noauth(cli, PI_SPOOLSS, &nt_status);
+ if (!pipe_hnd) {
+ d_fprintf(stderr, "Unable to open a connnection to the spoolss pipe on %s\n",
+ servername);
+ ads_destroy(&ads);
+ return -1;
+ }
+
get_remote_printer_publishing_data(pipe_hnd, mem_ctx, &mods,
printername);
More information about the samba-cvs
mailing list