Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
bb4a31a8
Commit
bb4a31a8
authored
Oct 23, 2012
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Oct 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Calculate SystemProcessInformation's ReturnLength and return it.
parent
3fc4e884
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
nt.c
dlls/ntdll/nt.c
+4
-3
info.c
dlls/ntdll/tests/info.c
+1
-1
No files found.
dlls/ntdll/nt.c
View file @
bb4a31a8
...
...
@@ -1739,9 +1739,8 @@ NTSTATUS WINAPI NtQuerySystemInformation(
/* spi->ti will be set later on */
len
+=
procstructlen
;
}
else
ret
=
STATUS_INFO_LENGTH_MISMATCH
;
len
+=
procstructlen
;
}
}
SERVER_END_REQ
;
...
...
@@ -1751,7 +1750,8 @@ NTSTATUS WINAPI NtQuerySystemInformation(
if
(
ret
==
STATUS_NO_MORE_FILES
)
ret
=
STATUS_SUCCESS
;
break
;
}
else
/* Length is already checked for */
if
(
Length
>=
len
)
{
int
i
,
j
;
...
...
@@ -1799,6 +1799,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
}
}
if
(
ret
==
STATUS_SUCCESS
&&
last
)
last
->
NextEntryOffset
=
0
;
if
(
len
>
Length
)
ret
=
STATUS_INFO_LENGTH_MISMATCH
;
if
(
hSnap
)
NtClose
(
hSnap
);
}
break
;
...
...
dlls/ntdll/tests/info.c
View file @
bb4a31a8
...
...
@@ -289,7 +289,7 @@ static void test_query_process(void)
ReturnLength
=
0
;
status
=
pNtQuerySystemInformation
(
SystemProcessInformation
,
NULL
,
0
,
&
ReturnLength
);
ok
(
status
==
STATUS_INFO_LENGTH_MISMATCH
,
"Expected STATUS_LENGTH_MISMATCH got %08x
\n
"
,
status
);
todo_wine
ok
(
ReturnLength
>
0
||
broken
(
ReturnLength
==
0
)
/* NT4, Win2K */
,
ok
(
ReturnLength
>
0
||
broken
(
ReturnLength
==
0
)
/* NT4, Win2K */
,
"Expected a ReturnLength to show the needed length
\n
"
);
/* W2K3 and later returns the needed length, the rest returns 0, so we have to loop */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment