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

Eitan Zahavi eitan at mellanox.co.il
Tue Oct 3 12:25:24 PDT 2006


Hi Hal,

This is another case where Michael complains about the patch not 
providing range checking.
However, range checking is not implemented for the rest of this parser 
code. So I think
the range check should be a separate patch.

Please let me know if this works for you

Thanks


Michael S. Tsirkin wrote:

>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?
>  
>





More information about the general mailing list