Skip to content

Commit 3437a1b

Browse files
Andy Grossgalak
authored andcommitted
ext: crypto: mbedtls: Fix uninitialized variable
This patch fixes an issue with an uninitialized variable in the x509 mbedtls feature. I sent a related patch to the mbedtls project so that this can be fixed in the future. Mbed-TLS/mbedtls#2392 Signed-off-by: Andy Gross <andy.gross@linaro.org>
1 parent 8a30061 commit 3437a1b

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

library/x509_crt.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2088,15 +2088,13 @@ static int x509_crt_find_parent_in(
20882088
continue;
20892089
}
20902090

2091-
break;
2092-
}
2093-
2094-
if( parent != NULL )
2095-
{
20962091
*r_parent = parent;
20972092
*r_signature_is_good = signature_is_good;
2093+
2094+
break;
20982095
}
2099-
else
2096+
2097+
if (parent == NULL)
21002098
{
21012099
*r_parent = fallback_parent;
21022100
*r_signature_is_good = fallback_signature_is_good;

0 commit comments

Comments
 (0)