mirror of
https://github.com/reactos/reactos.git
synced 2024-08-01 09:01:13 +00:00
Fix adding of the tag when the group order list already exists
svn path=/trunk/; revision=19155
This commit is contained in:
parent
c16594ec20
commit
ac4176016e
|
@ -1218,7 +1218,7 @@ BOOL WINAPI SetupInstallServicesFromInfSectionExW( HINF hinf, PCWSTR sectionname
|
|||
SetLastError(rc);
|
||||
goto cleanup;
|
||||
}
|
||||
else if (dwRegType != REG_BINARY || bufferSize % sizeof(DWORD) != 0)
|
||||
else if (dwRegType != REG_BINARY || bufferSize == 0 || bufferSize % sizeof(DWORD) != 0)
|
||||
{
|
||||
SetLastError(ERROR_GEN_FAILURE);
|
||||
goto cleanup;
|
||||
|
@ -1238,13 +1238,15 @@ BOOL WINAPI SetupInstallServicesFromInfSectionExW( HINF hinf, PCWSTR sectionname
|
|||
lpLoadOrderGroup,
|
||||
NULL,
|
||||
NULL,
|
||||
(flags & SPSVCINST_TAGTOFRONT) ? (BYTE*)&GroupOrder[1] : (BYTE*)&GroupOrder[0],
|
||||
(BYTE*)GroupOrder,
|
||||
&bufferSize);
|
||||
if (rc != ERROR_SUCCESS)
|
||||
{
|
||||
SetLastError(rc);
|
||||
goto cleanup;
|
||||
}
|
||||
if (flags & SPSVCINST_TAGTOFRONT)
|
||||
memmove(&GroupOrder[2], &GroupOrder[1], bufferSize - sizeof(DWORD));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue