Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix token serial number matching when trying to find hidden PKCS#11 key
Spotted by Coverity.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Sep 26, 2012
1 parent 0da6727 commit 644d962
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gnutls.c
Expand Up @@ -1114,7 +1114,7 @@ static int load_certificate(struct openconnect_info *vpninfo)
}
}
if (!token->serialNumber[0]) {
s = sizeof(token->serialNumber + 1);
s = sizeof(token->serialNumber) + 1;
if (!gnutls_pkcs11_obj_get_info(crt, GNUTLS_PKCS11_OBJ_TOKEN_SERIAL,
buf, &s)) {
s--;
Expand Down

0 comments on commit 644d962

Please sign in to comment.