infiniband-diags/libibnetdisc/ibnetdisc.c: Fix possible overrun of path
PATCH 1/1 infiniband-diags/libibnetdisc/ibnetdisc.c: Fix possible overrun of path
when path->cnt is 63 in add_port_to_dpath
---
libibnetdisc/src/ibnetdisc.c +1 -1
@@ -80,7 +80,7 @@ static int query_switch_info(smp_engine_t * engine, ib_portid_t * portid,static int add_port_to_dpath (ib_dr_path_t * path,int nextport) { -if (path->cnt >sizeof (path->p) -1 ) +if (path->cnt >sizeof (path->p) -2 )return -1 ; ++path->cnt; path->p[path->cnt] = (uint8_t ) nextport;
--
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
Ira Weiny
AppliedQuoted 4 lines · On Wed, 8 Jun 2011 05:47:15 -0700 Hal Rosenstock…
when
path->cntis 63 inadd_port_to_dpath
Thanks applied,
Ira
Quoted 14 lines
---
libibnetdisc/src/ibnetdisc.c +1
-1@@ -80,7 +80,7 @@ static int query_switch_info(smp_engine_t * engine, ib_portid_t * portid,static int add_port_to_dpath (ib_dr_path_t * path,int nextport) { -if (path->cnt >sizeof (path->p) -1 ) +if (path->cnt >sizeof (path->p) -2 )return -1 ; ++path->cnt; path->p[path->cnt] = (uint8_t ) nextport;
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