mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 14:13:01 +00:00
- If looking up a long name for a process failed, use short one. This fixes the issue with "System" not being displayed correctly.
- Round up process name length more correctly, as suggested by Evgeniy Boltik. See issue #4087 for more details. svn path=/trunk/; revision=39737
This commit is contained in:
parent
d06192c7c9
commit
98d1576628
1 changed files with 5 additions and 2 deletions
|
@ -753,7 +753,7 @@ QSI_DEF(SystemProcessInformation)
|
||||||
ImageNameLength = 0;
|
ImageNameLength = 0;
|
||||||
Status = SeLocateProcessImageName(Process, &ProcessImageName);
|
Status = SeLocateProcessImageName(Process, &ProcessImageName);
|
||||||
szSrc = NULL;
|
szSrc = NULL;
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status) && (ProcessImageName->Length > 0))
|
||||||
{
|
{
|
||||||
szSrc = (PWCHAR)((PCHAR)ProcessImageName->Buffer + ProcessImageName->Length);
|
szSrc = (PWCHAR)((PCHAR)ProcessImageName->Buffer + ProcessImageName->Length);
|
||||||
/* Loop the file name*/
|
/* Loop the file name*/
|
||||||
|
@ -777,7 +777,10 @@ QSI_DEF(SystemProcessInformation)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Round up the image name length as NT does */
|
/* Round up the image name length as NT does */
|
||||||
ImageNameMaximumLength = ROUND_UP(ImageNameLength, 8);
|
if (ImageNameLength > 0)
|
||||||
|
ImageNameMaximumLength = ROUND_UP(ImageNameLength + sizeof(WCHAR), 8);
|
||||||
|
else
|
||||||
|
ImageNameMaximumLength = 0;
|
||||||
|
|
||||||
TotalSize += CurrentSize + ImageNameMaximumLength;
|
TotalSize += CurrentSize + ImageNameMaximumLength;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue