mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-01-26 23:52:21 +01:00
verify previously unchecked return values
This commit is contained in:
@@ -2085,11 +2085,13 @@ int wolfSSL_ASN1_get_object(const unsigned char **in, long *len, int *tag,
|
||||
}
|
||||
if (!err) {
|
||||
/* Length at least 1, parameters valid - cannot fail to get tag. */
|
||||
GetASNTag(*in, &inOutIdx, &t, (word32)inLen);
|
||||
/* Get length in DER encoding. */
|
||||
if (GetLength_ex(*in, &inOutIdx, &l, (word32)inLen, 0) < 0) {
|
||||
WOLFSSL_MSG("GetLength error");
|
||||
err = 1;
|
||||
err = GetASNTag(*in, &inOutIdx, &t, (word32)inLen);
|
||||
if (!err){
|
||||
/* Get length in DER encoding. */
|
||||
if (GetLength_ex(*in, &inOutIdx, &l, (word32)inLen, 0) < 0) {
|
||||
WOLFSSL_MSG("GetLength error");
|
||||
err = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!err) {
|
||||
|
||||
@@ -11664,7 +11664,10 @@ static int PrintHexWithColon(WOLFSSL_BIO* out, const byte* input,
|
||||
|
||||
for (in = 0; in < (word32)inlen && ret == WOLFSSL_SUCCESS; in +=
|
||||
WOLFSSL_EVP_PKEY_PRINT_DIGITS_PER_LINE ) {
|
||||
Indent(out, indent);
|
||||
if (Indent(out, indent) < 0) {
|
||||
ret = WOLFSSL_FAILURE;
|
||||
break;
|
||||
}
|
||||
for (i = 0; (i < WOLFSSL_EVP_PKEY_PRINT_DIGITS_PER_LINE) &&
|
||||
(in + i < (word32)inlen); i++) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user