-
由 Alan Stern 提交于
This patch fixes an out-of-bounds error in sd_read_cache_type(), found by Google's AddressSanitizer tool. When the loop ends, we know that "offset" lies beyond the end of the data in the buffer, so no Caching mode page was found. In theory it may be present, but the buffer size is limited to 512 bytes. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Reported-by: NDmitry Vyukov <dvyukov@google.com> CC: <stable@vger.kernel.org> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
984f1733