summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Walden <jwalden@mit.edu>2020-06-05 21:19:39 +0000
committerJeff Walden <jwalden@mit.edu>2020-06-05 21:19:39 +0000
commit07eda9e427f1b47b3e45af269578b6c7f1c4c79b (patch)
tree75ca3219fa2b82e49b2c8f7fff334a47c8c8963f
parent8f4b20c018904c606950703659c8fd077c6bee47 (diff)
downloadnss-hg-07eda9e427f1b47b3e45af269578b6c7f1c4c79b.tar.gz
Bug 1643557 - Use size_t for various counts in pk11slot.c. r=kjacobs
Depends on D78451 Differential Revision: https://phabricator.services.mozilla.com/D78452
-rw-r--r--lib/pk11wrap/pk11slot.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/pk11wrap/pk11slot.c b/lib/pk11wrap/pk11slot.c
index 162f3d2dc..2451c3639 100644
--- a/lib/pk11wrap/pk11slot.c
+++ b/lib/pk11wrap/pk11slot.c
@@ -4,6 +4,9 @@
/*
* Deal with PKCS #11 Slots.
*/
+
+#include <stddef.h>
+
#include "seccomon.h"
#include "secmod.h"
#include "nssilock.h"
@@ -1182,7 +1185,7 @@ pk11_ReadProfileList(PK11SlotInfo *slot)
CK_ATTRIBUTE *attrs;
CK_BBOOL cktrue = CK_TRUE;
CK_OBJECT_CLASS oclass = CKO_PROFILE;
- int tsize;
+ size_t tsize;
int objCount;
CK_OBJECT_HANDLE *handles = NULL;
int i;
@@ -1484,7 +1487,7 @@ pk11_isRootSlot(PK11SlotInfo *slot)
CK_ATTRIBUTE findTemp[1];
CK_ATTRIBUTE *attrs;
CK_OBJECT_CLASS oclass = CKO_NSS_BUILTIN_ROOT_LIST;
- int tsize;
+ size_t tsize;
CK_OBJECT_HANDLE handle;
attrs = findTemp;
@@ -2613,7 +2616,7 @@ SECStatus
PK11_ResetToken(PK11SlotInfo *slot, char *sso_pwd)
{
unsigned char tokenName[32];
- int tokenNameLen;
+ size_t tokenNameLen;
CK_RV crv;
/* reconstruct the token name */