diff options
Diffstat (limited to 'lib/pk11wrap/pk11merge.c')
-rw-r--r-- | lib/pk11wrap/pk11merge.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/pk11wrap/pk11merge.c b/lib/pk11wrap/pk11merge.c index d14f44c78..b2101b819 100644 --- a/lib/pk11wrap/pk11merge.c +++ b/lib/pk11wrap/pk11merge.c @@ -68,8 +68,11 @@ pk11_copyAttributes(PLArenaPool *arena, copyTemplate, copyTemplateCount); /* if we have missing attributes, just skip them and create the object */ if (crv == CKR_ATTRIBUTE_TYPE_INVALID) { - int i, j; + CK_ULONG i, j; newTemplate = PORT_NewArray(CK_ATTRIBUTE, copyTemplateCount); + if (!newTemplate) { + return SECFailure; + } /* remove the unknown attributes. If we don't have enough attributes * PK11_CreateNewObject() will fail */ for (i = 0, j = 0; i < copyTemplateCount; i++) { |