IB/ipath: Limit length checksummed in eeprom
The small eeprom that holds the GUID etc. contains a data-length, but if the actual eeprom is new or has been erased, that byte will be 0xFF, which is greater than the maximum physical length of the eeprom, and more importantly greater than the length of the buffer we vmalloc'd. Sanity-check the length to avoid the possbility of reading past end of buffer. Signed-off-by: NMichael Albaugh <Michael.Albaugh@Qlogic.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
Showing
想要评论请 注册 或 登录