Remove NULL check for pDlgroup for consistency with other SetValue API

+ Callers would invariably check for NULL after Allocate / Create
  anyway, so this would be a duplicate check
+ Also resolve some nitpick issues in build for razzle / build with
  Linux with jitterentropy
This commit is contained in:
Samuel Lee 2021-11-24 04:53:01 -08:00
Родитель e21acd0b57
Коммит 347c4dd1a0
4 изменённых файлов: 3 добавлений и 4 удалений

1
.gitmodules поставляемый
Просмотреть файл

@ -5,3 +5,4 @@
[submodule "jitterentropy-library"]
path = jitterentropy-library
url = https://github.com/smuellerDD/jitterentropy-library
ignore = untracked

Просмотреть файл

@ -5220,8 +5220,6 @@ SymCryptDlgroupSetValueSafePrime(
// to 0 in allocation (equivalent to nBitsOfQ = (nBitsOfP-1)) when creating a safe-prime group.
//
// Requirements:
// - pDlgroup!=NULL. Otherwise it returns SYMCRYPT_INVALID_ARGUMENT.
//
// - pDlgroup was allocated with sufficient bits for the selected P (and Q) to fit. If there is no
// named safe-prime group with bit size <= the allocated size, it returns SYMCRYPT_INVALID_ARGUMENT.
// The minimum currently supported bitsize of named safe-prime groups is nBitsOfP = 2048.

Просмотреть файл

@ -1097,7 +1097,7 @@ SymCryptDlgroupSetValueSafePrime(
UINT32 nMaxBitsOfP = SYMCRYPT_MIN(pDlgroup->nMaxBitsOfP, pDlgroup->nMaxBitsOfQ+1);
UINT32 nMaxDigitsOfP;
if ( pDlgroup == NULL || dhSafePrimeType == SYMCRYPT_DLGROUP_DH_SAFEPRIMETYPE_NONE )
if ( dhSafePrimeType == SYMCRYPT_DLGROUP_DH_SAFEPRIMETYPE_NONE )
{
scError = SYMCRYPT_INVALID_ARGUMENT;
goto cleanup;

Просмотреть файл

@ -68,7 +68,7 @@ scheduleAsyncTest( SelfTestFn f, BYTE rnd )
{
PKDPC pDpc;
pDpc = (PKDPC) ExAllocatePoolWithTag( NonPagedPoolNx, sizeof( KDPC ), 'TcCS' );
pDpc = (PKDPC) ExAllocatePoolZero( NonPagedPoolNx, sizeof( KDPC ), 'TcCS' );
if( pDpc == NULL )
{
return;