mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
COVA10663: more mbedtls_mpi_write_binary return check instances
This commit is contained in:
parent
abcaefc1ff
commit
fdeadbfdef
1 changed files with 4 additions and 2 deletions
|
@ -442,10 +442,12 @@ lws_genrsa_render_pkey_asn1(struct lws_genrsa_ctx *ctx, int _private,
|
|||
if (p + m > end)
|
||||
return -1;
|
||||
|
||||
mbedtls_mpi_write_binary(mpi[n], p, m);
|
||||
if (mbedtls_mpi_write_binary(mpi[n], p, m))
|
||||
return -1;
|
||||
if (p[0] & 0x80) {
|
||||
p[0] = 0x00;
|
||||
mbedtls_mpi_write_binary(mpi[n], &p[1], m);
|
||||
if (mbedtls_mpi_write_binary(mpi[n], &p[1], m))
|
||||
return -1;
|
||||
m++;
|
||||
}
|
||||
if (m < 0x7f)
|
||||
|
|
Loading…
Add table
Reference in a new issue