Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ssl_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ int wolfSSL_ASN1_INTEGER_get_length(const WOLFSSL_ASN1_INTEGER* ai)
if (ai->data[0] == ASN_INTEGER) {
word32 idx = 1;
int len = 0;
if (GetLength(ai->data, &idx, &len, (word32)ai->length) > 0 &&
if (GetLength(ai->data, &idx, &len, (word32)ai->length) >= 0 &&
idx + (word32)len == (word32)ai->length) {
return len;
Comment thread
julek-wolfssl marked this conversation as resolved.
}
Expand All @@ -1043,7 +1043,7 @@ const unsigned char* wolfSSL_ASN1_INTEGER_get0_data(const WOLFSSL_ASN1_INTEGER*
if (ai->data[0] == ASN_INTEGER) {
word32 idx = 1;
int len = 0;
if (GetLength(ai->data, &idx, &len, (word32)ai->length) > 0 &&
if (GetLength(ai->data, &idx, &len, (word32)ai->length) >= 0 &&
idx + (word32)len == (word32)ai->length) {
return ai->data + idx;
}
Expand Down
Loading