Merge pull request #378 from libtom/pr/clang-tidy-misc-suspicious-string-compare
clang-tidy: misc-suspicious-string-compare
This commit is contained in:
commit
24f933d22a
@ -93,7 +93,7 @@ int x509_decode_subject_public_key_info(const unsigned char *in, unsigned long i
|
||||
}
|
||||
|
||||
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