libibmad/[register rpc].c: Fix some bounds checks
PATCH 1/1 libibmad/[register rpc].c: Fix some bounds checks
---
src/register.c +1 -1
@@ -77,7 +77,7 @@ static int mgmt_class_vers(int mgmt_class)int mad_class_agent (int mgmt) { -if (mgmt <1 || mgmt >MAX_CLASS ) +if (mgmt <1 || mgmt >=MAX_CLASS )return -1 ;return ibmp->class_agents[mgmt]; }
src/rpc.c +1 -1
@@ -120,7 +120,7 @@ int mad_rpc_portid(struct ibmad_port *srcport)int mad_rpc_class_agent (struct ibmad_port *port,int class) { -if (class <1 || class >MAX_CLASS ) +if (class <1 || class >=MAX_CLASS )return -1 ;return port->class_agents[class]; }
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 4DE64295.6040908-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org
Ira Weiny
AppliedQuoted 2 lines · On Wed, 1 Jun 2011 06:45:57 -0700 Hal Rosenstock…
Thanks, applied,
Ira
Quoted 27 lines
---
src/register.c +1
-1@@ -77,7 +77,7 @@ static int mgmt_class_vers(int mgmt_class)int mad_class_agent (int mgmt) { -if (mgmt <1 || mgmt >MAX_CLASS ) +if (mgmt <1 || mgmt >=MAX_CLASS )return -1 ;return ibmp->class_agents[mgmt]; }src/rpc.c +1
-1@@ -120,7 +120,7 @@ int mad_rpc_portid(struct ibmad_port *srcport)int mad_rpc_class_agent (struct ibmad_port *port,int class) { -if (class <1 || class >MAX_CLASS ) +if (class <1 || class >=MAX_CLASS )return -1 ;return port->class_agents[class]; }
Signature · 9 lines
Ira Weiny Math Programmer/Computer Scientist Lawrence Livermore National Lab 925-423-8008 [email protected] -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html