mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 09:21:50 +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;
|
||||
Status = SeLocateProcessImageName(Process, &ProcessImageName);
|
||||
szSrc = NULL;
|
||||
if (NT_SUCCESS(Status))
|
||||
if (NT_SUCCESS(Status) && (ProcessImageName->Length > 0))
|
||||
{
|
||||
szSrc = (PWCHAR)((PCHAR)ProcessImageName->Buffer + ProcessImageName->Length);
|
||||
/* Loop the file name*/
|
||||
|
@ -777,7 +777,10 @@ QSI_DEF(SystemProcessInformation)
|
|||
}
|
||||
|
||||
/* 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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue