Skip to content
Snippets Groups Projects
Commit 1e58668a authored by Nicolas Toromanoff's avatar Nicolas Toromanoff Committed by Sebastien Pasdeloup
Browse files

auth: correct sign-compare warning


Correct the warning due to compare signed and non signed variable.

Signed-off-by: default avatarNicolas Toromanoff <nicolas.toromanoff@st.com>
Change-Id: Ic12527f5f92a34e925bee3047c168eacf5e99d8a
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/189410


Reviewed-by: default avatarCITOOLS <smet-aci-reviews@lists.codex.cro.st.com>
Reviewed-by: default avatarLionel DEBIEVE <lionel.debieve@st.com>
Reviewed-by: default avatarYann GAUTIER <yann.gautier@st.com>
parent 296132d5
No related branches found
No related tags found
No related merge requests found
......@@ -114,10 +114,10 @@ static int get_ext(const char *oid, void **ext, unsigned int *ext_len)
oid_len = mbedtls_oid_get_numeric_string(oid_str,
MAX_OID_STR_LEN,
&extn_oid);
if (oid_len == MBEDTLS_ERR_OID_BUF_TOO_SMALL) {
if ((oid_len == MBEDTLS_ERR_OID_BUF_TOO_SMALL) || (oid_len < 0)) {
return IMG_PARSER_ERR;
}
if ((oid_len == strlen(oid_str)) && !strcmp(oid, oid_str)) {
if (((size_t)oid_len == strlen(oid_str)) && !strcmp(oid, oid_str)) {
*ext = (void *)p;
*ext_len = (unsigned int)len;
return IMG_PARSER_OK;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment