Rob Shearman : rpcrt4: Return a fault packet if the proc num exceeds the index of the last function available for the interface .

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jul 5 13:31:25 CDT 2007


Module: wine
Branch: master
Commit: 69eeb8b1b7142a553d2b4dbf79cd8fde413bcb99
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=69eeb8b1b7142a553d2b4dbf79cd8fde413bcb99

Author: Rob Shearman <rob at codeweavers.com>
Date:   Thu Jul  5 12:56:35 2007 +0100

rpcrt4: Return a fault packet if the proc num exceeds the index of the last function available for the interface.

---

 dlls/rpcrt4/rpc_server.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c
index 4b9a93d..328c0d0 100644
--- a/dlls/rpcrt4/rpc_server.c
+++ b/dlls/rpcrt4/rpc_server.c
@@ -260,8 +260,12 @@ static void RPCRT4_process_packet(RpcConnection* conn, RpcPktHdr* hdr, RPC_MESSA
         func = *sif->If->DispatchTable->DispatchTable;
       } else {
         if (msg->ProcNum >= sif->If->DispatchTable->DispatchTableCount) {
-          ERR("invalid procnum\n");
-          func = NULL;
+          WARN("invalid procnum (%d/%d)\n", msg->ProcNum, sif->If->DispatchTable->DispatchTableCount);
+          response = RPCRT4_BuildFaultHeader(NDR_LOCAL_DATA_REPRESENTATION,
+                                             NCA_S_OP_RNG_ERROR);
+
+          RPCRT4_Send(conn, response, NULL, 0);
+          RPCRT4_FreeHeader(response);
         }
         func = sif->If->DispatchTable->DispatchTable[msg->ProcNum];
       }




More information about the wine-cvs mailing list