From ee2b9c2d3ee22dfbc8fd2eb2cc470ae853d4e19a Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Wed, 25 Jul 2012 01:55:27 -0400 Subject: [PATCH] rx: protect against invalid params in rx_Copy*RPCStats Protect against: . rxi_Alloc() failure Change-Id: I3334855e261bb40d5720fd376e62028760f0cee5 Reviewed-on: http://gerrit.openafs.org/7873 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/rx/rx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rx/rx.c b/src/rx/rx.c index f4af618dd..4689bea9a 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -8232,6 +8232,9 @@ rx_CopyProcessRPCStats(afs_uint64 op) if (rxInterface == -1) return NULL; + if (rpcop_stat == NULL) + return NULL; + MUTEX_ENTER(&rx_rpc_stats); rpc_stat = rxi_FindRpcStat(&processStats, rxInterface, 0, 0, 0, 0, 0, 0, 0); @@ -8262,6 +8265,9 @@ rx_CopyPeerRPCStats(afs_uint64 op, afs_uint32 peerHost, afs_uint16 peerPort) if (rxInterface == -1) return NULL; + if (rpcop_stat == NULL) + return NULL; + peer = rxi_FindPeer(peerHost, peerPort, 0, 0); if (!peer) return NULL; -- 2.39.5