From e6dbfae86d6e29623df99d3438e5ce875df1576e Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 12 Aug 2004 18:22:32 +0000 Subject: [PATCH] r1781: don't crash when xp sp2 sends a fnpcn() without prior ffpcn() --- source/rpc_server/srv_spoolss_nt.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 661b9d310ad..59344b3ff86 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -2832,6 +2832,12 @@ static WERROR printserver_notify_info(pipes_struct *p, POLICY_HND *hnd, 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; icount; i++) { option_type=&(option->ctr.type[i]); @@ -2893,6 +2899,12 @@ static WERROR printer_notify_info(pipes_struct *p, POLICY_HND *hnd, SPOOL_NOTIFY 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; icount; i++) { -- 2.11.4.GIT