From: Ilya Nelkenbaum <ilyan-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH] ibutils/ibis: fix ibis_get_local_ports_info uninitialized variable
Date: Thu, 20 Mar 2014 10:40:33 +0200 [thread overview]
Message-ID: <532AA981.9080403@dev.mellanox.co.il> (raw)
Initialize attr_array before calling osm_vendor_get_all_port_attr
Signed-off-by: Eitan Zahavi <eitan-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
Signed-off-by: Daniel Klein <danielk-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
ibis/src/ibis.i | 1 +
ibis/src/ibis_wrap.c | 1 +
ibis/src/ibissh_wrap.cpp | 1 +
3 files changed, 3 insertions(+), 0 deletions(-)
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(
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
reply other threads:[~2014-03-20 8:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=532AA981.9080403@dev.mellanox.co.il \
--to=ilyan-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox