Merge pull request #378 from libtom/pr/clang-tidy-misc-suspicious-string-compare
clang-tidy: misc-suspicious-string-compare (cherry picked from commit 24f933d22ab0b6680a3d0f8d0424d15b0273ace7)
This commit is contained in:
parent
1783100e7b
commit
00dfe66081
@ -80,7 +80,7 @@ int der_decode_subject_public_key_info(const unsigned char *in, unsigned long in
|
||||
}
|
||||
|
||||
if ((alg_id[0].size != oid.OIDlen) ||
|
||||
XMEMCMP(oid.OID, alg_id[0].data, oid.OIDlen * sizeof(oid.OID[0]))) {
|
||||
XMEMCMP(oid.OID, alg_id[0].data, oid.OIDlen * sizeof(oid.OID[0])) != 0) {
|
||||
/* OID mismatch */
|
||||
err = CRYPT_PK_INVALID_TYPE;
|
||||
goto LBL_ERR;
|
||||
|
@ -114,7 +114,7 @@ int rsa_import_pkcs8(const unsigned char *in, unsigned long inlen,
|
||||
|
||||
/* check alg oid */
|
||||
if ((alg_seq[0].size != rsaoid.OIDlen) ||
|
||||
XMEMCMP(rsaoid.OID, alg_seq[0].data, rsaoid.OIDlen * sizeof(rsaoid.OID[0]))) {
|
||||
XMEMCMP(rsaoid.OID, alg_seq[0].data, rsaoid.OIDlen * sizeof(rsaoid.OID[0])) != 0) {
|
||||
err = CRYPT_PK_INVALID_TYPE;
|
||||
goto LBL_ERR;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user