[openib-general] [PATCH] opensm: ibnetdiscover: fix switch info size

Sasha Khapyorsky sashak at voltaire.com
Mon Jul 10 14:23:40 PDT 2006


This fixes overflow of buffer used for switchinfo in ibnetdiscover.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---

 diags/src/ibnetdiscover.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/diags/src/ibnetdiscover.c b/diags/src/ibnetdiscover.c
index 021f93f..a71bab7 100644
--- a/diags/src/ibnetdiscover.c
+++ b/diags/src/ibnetdiscover.c
@@ -124,7 +124,7 @@ int
 get_node(Node *node, Port *port, ib_portid_t *portid)
 {
 	char portinfo[64];
-	char switchinfo[32];
+	char switchinfo[64];
 	void *pi = portinfo, *ni = node->nodeinfo, *nd = node->nodedesc;
 	void *si = switchinfo;
 




More information about the general mailing list