svn commit: samba r1781 - branches/SAMBA_2_2/source/rpc_server

jerry at samba.org jerry at samba.org
Thu Aug 12 18:22:33 GMT 2004


Author: jerry
Date: 2004-08-12 18:22:32 +0000 (Thu, 12 Aug 2004)
New Revision: 1781
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/&rev=1781&nolog=1
Log:
don't crash when xp sp2 sends a fnpcn() without prior ffpcn()
Modified:
   branches/SAMBA_2_2/source/rpc_server/srv_spoolss_nt.c

Changeset:
Modified: branches/SAMBA_2_2/source/rpc_server/srv_spoolss_nt.c
===================================================================
--- branches/SAMBA_2_2/source/rpc_server/srv_spoolss_nt.c	2004-08-12 18:21:42 UTC (rev 1780)
+++ branches/SAMBA_2_2/source/rpc_server/srv_spoolss_nt.c	2004-08-12 18:22:32 UTC (rev 1781)
@@ -2832,6 +2832,12 @@
 	info->data=NULL;
 	info->count=0;
 
+	/* a bug in xp sp2 rc2 causes it to send a fnpcn request without 
+	   sending a ffpcn() request first */
+
+	if ( !option )
+		return WERR_BADFID;
+
 	for (i=0; i<option->count; i++) {
 		option_type=&(option->ctr.type[i]);
 		
@@ -2893,6 +2899,12 @@
 	info->data=NULL;
 	info->count=0;
 
+	/* a bug in xp sp2 rc2 causes it to send a fnpcn request without 
+	   sending a ffpcn() request first */
+
+	if ( !option )
+		return WERR_BADFID;
+
 	get_printer_snum(p, hnd, &snum);
 
 	for (i=0; i<option->count; i++) {



More information about the samba-cvs mailing list