[PATCH v2 4/6] ntdll: Expose ntdll_check_buffer_for_read and ntdll_check_buffer_for_write to Unix libs.

Jacek Caban jacek at codeweavers.com
Tue Oct 5 13:33:45 CDT 2021


On 10/5/21 7:56 PM, Alexandre Julliard wrote:
> Jacek Caban <jacek at codeweavers.com> writes:
>
>> Signed-off-by: Jacek Caban <jacek at codeweavers.com>
>> ---
>>   dlls/ntdll/unix/file.c         |  6 +++---
>>   dlls/ntdll/unix/socket.c       |  2 +-
>>   dlls/ntdll/unix/unix_private.h |  2 --
>>   dlls/ntdll/unix/virtual.c      | 16 ++++++++--------
>>   include/wine/unixlib.h         |  2 ++
>>   5 files changed, 14 insertions(+), 14 deletions(-)
> Is that one also meant to be temporary?  That sort of thing should be
> handled by the syscall exception handling.


I originally solved it with the attached patch (it would need to be 
changed for _NTSYSTEM_/WINE_UNIX_LIB), does something like that look 
better? I changed it because I noticed that ntdll uses 
virtual_check_buffer_for_* instead. Default syscall exception behaviour 
of returning exception code is not enough in those cases 
(convert_bitmapinfo callers need to do cleanup and we have a test that 
NtGdiAddFontMemResourceEx returns 0, not an exception code).


Thanks,

Jacek

-------------- next part --------------
A non-text attachment was scrubbed...
Name: exception.diff
Type: text/x-patch
Size: 3444 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20211005/03253c9d/attachment-0001.bin>


More information about the wine-devel mailing list