Message ID | 51EE9E6F.8000402@dev.mellanox.co.il (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Hal Rosenstock |
Headers | show |
diff --git a/opensm/osm_db_pack.c b/opensm/osm_db_pack.c index 708a875..8cddd06 100644 --- a/opensm/osm_db_pack.c +++ b/opensm/osm_db_pack.c @@ -73,14 +73,18 @@ static inline int unpack_lids(IN char *p_lid_str, OUT uint16_t * p_min_lid, if (!p_num) return 1; tmp = strtoul(p_num, NULL, 0); - CL_ASSERT(tmp < 0x10000); + if (tmp >= 0xC000) + return 1; + *p_min_lid = (uint16_t) tmp; p_num = strtok_r(NULL, " \t", &p_next); if (!p_num) return 1; tmp = strtoul(p_num, NULL, 0); - CL_ASSERT(tmp < 0x10000); + if (tmp >= 0xC000) + return 1; + *p_max_lid = (uint16_t) tmp; return 0;