Commit 69eeb8b1 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

rpcrt4: Return a fault packet if the proc num exceeds the index of the last…

rpcrt4: Return a fault packet if the proc num exceeds the index of the last function available for the interface.
parent 234b8cbe
......@@ -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];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment