[ofa-general] [PATCH] opensm/osm_path.h: In osm_dr_path_init, only copy needed part of path
Hal Rosenstock
hnrose at comcast.net
Sun Aug 2 08:22:04 PDT 2009
Signed-off-by: Hal Rosenstock <hal.rosenstock at gmail.com>
---
diff --git a/opensm/include/opensm/osm_path.h b/opensm/include/opensm/osm_path.h
index 8d65d2c..7ef0fc5 100644
--- a/opensm/include/opensm/osm_path.h
+++ b/opensm/include/opensm/osm_path.h
@@ -155,7 +156,7 @@ osm_dr_path_init(IN osm_dr_path_t * const p_path,
CL_ASSERT(hop_count < IB_SUBNET_PATH_HOPS_MAX);
p_path->h_bind = h_bind;
p_path->hop_count = hop_count;
- memcpy(p_path->path, path, IB_SUBNET_PATH_HOPS_MAX);
+ memcpy(p_path->path, path, hop_count + 1);
}
/*
More information about the general
mailing list