[openib-general] [PATCH 7/13] osm: port to WinIB stack : opensm/osm_ucast_file.c

Michael S. Tsirkin mst at mellanox.co.il
Sun Sep 17 10:35:18 PDT 2006


Quoting r. Eitan Zahavi <eitan at mellanox.co.il>:
>  				p++;
> -			port_num = strtoul(p, &q, 10);
> +			port_num = (uint8_t)strtoul(p, &q, 10);
>  			if (q && !isspace(*q)) {

Would it make sense to range-check the value before casting it away?
-- 
MST




More information about the general mailing list