http://bugs.winehq.org/show_bug.cgi?id=8776
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #11 from Anastasius Focht focht@gmx.net 2007-12-03 19:42:13 --- Hello,
@Louis Lenders
Although I'm not subscribed to any wine mailing lists I sometimes read the parts using news.gmane.org archive.
Just a simple advice: adding test cases for the patch will rise chances
The patch is just an improved version of yours with synchronous handling of multiple segments and initial parameter validation added. Make standard harness tests: NULL pointers, misaligned data chunks and reading multiple chunks. The remaining "invalid input data" cases (invalid buffers/segment structures passed into API) can be discarded for now. If some broken app appears one day, this "special" treatment can be added then ( using SEH or 'evil' IsBadXXX).
For the file offset case (which gets passed via overlapped into ReadFile and manually incremented within loop) it's probably cleaner to save the value to a temporary and later restore it before scatter API function returns. It might be possible that some brain damaged app tries to "reuse" the offset in "+=" fashion.
If the above criteria are met, I don't see any objections that you can't post it to wine patches.
Regards