Module: wine Branch: master Commit: 5b1f3b14caed3aeaeac2eb09846857106ecce757 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5b1f3b14caed3aeaeac2eb0984...
Author: Eric Pouech eric.pouech@wanadoo.fr Date: Sat Nov 4 11:52:44 2006 +0100
ntdll: Fixed returned status for NtQueryThreadInformation's ThreadDescriptorTable (spotted by Peter Oberndorfer).
---
dlls/ntdll/thread.c | 6 ++++-- server/ptrace.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 151ff1e..43eb0cd 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -1150,7 +1150,7 @@ #ifdef __i386__ if (!status) { if (!(reply->flags & WINE_LDT_FLAGS_ALLOCATED)) - status = STATUS_INVALID_LDT_OFFSET; + status = STATUS_ACCESS_VIOLATION; else { wine_ldt_set_base ( &tdi->Entry, (void *)reply->base ); @@ -1161,7 +1161,9 @@ #ifdef __i386__ } SERVER_END_REQ; } - if (status == STATUS_SUCCESS && ret_len) *ret_len = sizeof(*tdi); + if (status == STATUS_SUCCESS && ret_len) + /* yes, that's a bit strange, but it's the way it is */ + *ret_len = sizeof(LDT_ENTRY); #else status = STATUS_NOT_IMPLEMENTED; #endif diff --git a/server/ptrace.c b/server/ptrace.c index ef72713..26a4042 100644 --- a/server/ptrace.c +++ b/server/ptrace.c @@ -445,7 +445,7 @@ void get_selector_entry( struct thread * } if (entry >= 8192) { - set_error( STATUS_INVALID_PARAMETER ); /* FIXME */ + set_error( STATUS_ACCESS_VIOLATION ); return; } if (suspend_for_ptrace( thread ))