https://bugs.winehq.org/show_bug.cgi?id=47424
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #5 from Zebediah Figura z.figura12@gmail.com --- (In reply to Peter from comment #4)
I don't believe it is 100% correct, but it is good enough. I understand that this is due to Linux' implementation of 'resid'.
Not 100% correct because the input value 'DataTransferLength' may be, and often is, more than what is really returned. Meaning it is possible to setup a buffer of (for instance) 64KB, put that value in 'DataTransferLength' and send a command that will only return a few bytes.
In current suggested fix a buffer under-run may not be properly detected if the input buffer was bigger than the expected return data, because 'resid' may be smaller than what the buffer was bigger than required.
I'm not sure I follow. Under what circumstances is the patch wrong?