1
0
Fork 0
forked from len0rd/rockbox

ignore write data if the length doesn't match what we expect. This avoids the data corruption caused by FS#10319, but doesn't solve the root cause yet (patch by Martin Ritter)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21521 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Frank Gevaerts 2009-06-26 15:14:49 +00:00
parent e2b018e7fe
commit 057a5802cd

View file

@ -472,6 +472,7 @@ void usb_storage_transfer_complete(int ep,int dir,int status,int length)
if((unsigned int)length!=(SECTOR_SIZE* cur_cmd.count) if((unsigned int)length!=(SECTOR_SIZE* cur_cmd.count)
&& (unsigned int)length!=WRITE_BUFFER_SIZE) { && (unsigned int)length!=WRITE_BUFFER_SIZE) {
logf("unexpected length :%d",length); logf("unexpected length :%d",length);
break;
} }
unsigned int next_sector = cur_cmd.sector + unsigned int next_sector = cur_cmd.sector +