Skip to content

Commit

Permalink
last few edits of the ssl file
Browse files Browse the repository at this point in the history
  • Loading branch information
gasbytes committed Oct 31, 2024
1 parent f4eb775 commit 5b7f03d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -23029,7 +23029,7 @@ static int bio_get_data(WOLFSSL_BIO* bio, byte** data)

ret = wolfSSL_BIO_get_len(bio);
if (ret > 0) {
mem = (byte*)XMALLOC(ret, bio->heap, DYNAMIC_TYPE_OPENSSL);
mem = (byte*)XMALLOC((size_t)ret, bio->heap, DYNAMIC_TYPE_OPENSSL);
if (mem == NULL) {
WOLFSSL_MSG("Memory error");
ret = MEMORY_E;
Expand Down Expand Up @@ -23122,18 +23122,18 @@ WOLFSSL_EVP_PKEY* wolfSSL_d2i_AutoPrivateKey(WOLFSSL_EVP_PKEY** pkey,
*/
ret = GetSequence(der, &idx, &len, keyLen);
if (ret >= 0) {
word32 end = idx + len;
word32 end = idx + (word32)len;
while (ret >= 0 && idx < end) {
/* Skip type */
idx++;
/* Get length and skip over - keeping count */
len = 0;
ret = GetLength(der, &idx, &len, keyLen);
if (ret >= 0) {
if (idx + len > end)
if (idx + (word32)len > end)
ret = ASN_PARSE_E;
else {
idx += len;
idx += (word32)len;
cnt++;
}
}
Expand Down

0 comments on commit 5b7f03d

Please sign in to comment.