Index: mozilla/security/nss/lib/pk11wrap/pk11merge.c |
=================================================================== |
--- mozilla/security/nss/lib/pk11wrap/pk11merge.c (revision 180567) |
+++ mozilla/security/nss/lib/pk11wrap/pk11merge.c (working copy) |
@@ -429,6 +429,7 @@ |
SECItem *sourceOutput = NULL; |
SECItem *targetOutput = NULL; |
SECItem *param = NULL; |
+ int blockSize; |
SECItem input; |
CK_OBJECT_HANDLE targetKeyID; |
CK_FLAGS flags; |
@@ -491,11 +492,12 @@ |
/* set up the input test */ |
input.data = (unsigned char *)testString; |
- input.len = PK11_GetBlockSize(cryptoMechType, NULL); |
- if (input.len < 0) { |
+ blockSize = PK11_GetBlockSize(cryptoMechType, NULL); |
+ if (blockSize < 0) { |
rv = SECFailure; |
goto done; |
} |
+ input.len = blockSize; |
if (input.len == 0) { |
input.len = sizeof (testString); |
} |