Codebase list ibutils / debian/1.5.7-4 debian / patches / git-bd7e502.patch
debian/1.5.7-4

Tree @debian/1.5.7-4 (Download .tar.gz)

git-bd7e502.patch @debian/1.5.7-4raw · history · blame

commit bd7e50228316124502505599009048d79b9bfdb6
Author: Daniel Klein <danielk@mellanox.com>
Date:   Wed Mar 19 18:59:09 2014 +0200

    ibutils\ibis: fix ibis_get_local_ports_info uninitialized variable
    
    Initialize attr_array before calling osm_vendor_get_all_port_attr
    
    Signed-off-by: Eitan Zahavi <eitan@mellanox.co.il>
    Signed-off-by: Daniel Klein <danielk@mellanox.com>

diff --git a/ibis/src/ibis.i b/ibis/src/ibis.i
index 8fc4440..28a0912 100644
--- a/ibis/src/ibis.i
+++ b/ibis/src/ibis.i
@@ -385,6 +385,7 @@ ibisp_is_debug(void)
 	 static char res[128];
 	 Tcl_Obj *p_obj;
 
+    memset(attr_array, 0, MAX_LOCAL_IBPORTS*sizeof(ib_port_attr_t));
     if (!IbisObj.initialized)
     {
       Tcl_SetStringObj(
diff --git a/ibis/src/ibis_wrap.c b/ibis/src/ibis_wrap.c
index 5098c2a..ee97601 100644
--- a/ibis/src/ibis_wrap.c
+++ b/ibis/src/ibis_wrap.c
@@ -3209,6 +3209,7 @@ typedef struct {
 	 static char res[128];
 	 Tcl_Obj *p_obj;
 
+    memset(attr_array, 0, MAX_LOCAL_IBPORTS*sizeof(ib_port_attr_t));
     if (!IbisObj.initialized)
     {
       Tcl_SetStringObj(
diff --git a/ibis/src/ibissh_wrap.cpp b/ibis/src/ibissh_wrap.cpp
index f75cde6..917904f 100644
--- a/ibis/src/ibissh_wrap.cpp
+++ b/ibis/src/ibissh_wrap.cpp
@@ -3209,6 +3209,7 @@ typedef struct {
 	 static char res[128];
 	 Tcl_Obj *p_obj;
 
+    memset(attr_array, 0, MAX_LOCAL_IBPORTS*sizeof(ib_port_attr_t));
     if (!IbisObj.initialized)
     {
       Tcl_SetStringObj(