[Bug 47424] DataTransferLength in SCSI_PASS_THROUGH and SCSI_PASS_THROUGH_DIRECT *must* have return value

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Jul 2 09:49:53 CDT 2019


https://bugs.winehq.org/show_bug.cgi?id=47424

Zebediah Figura <z.figura12 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |z.figura12 at gmail.com

--- Comment #5 from Zebediah Figura <z.figura12 at 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?

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list