Fix coverity issues

This commit is contained in:
Eric Blankenhorn
2022-10-07 14:49:05 -05:00
parent 82fbb7920a
commit b4e0137d37
3 changed files with 4 additions and 2 deletions

View File

@ -12064,7 +12064,7 @@ static int GetHashId(const byte* id, int length, byte* hash)
/* Id for jurisdiction country. */
#define ASN_JURIS_C 0x203
/* Id for jurisdiction state. */
#define ASN_JURIS_ST 0x203
#define ASN_JURIS_ST 0x202
/* Set the string for a name component into the subject name. */
#define SetCertNameSubject(cert, id, val) \

View File

@ -10586,7 +10586,7 @@ static int wc_ecc_import_raw_private(ecc_key* key, const char* qx,
WOLFSSL_MSG("Invalid Qx");
err = BAD_FUNC_ARG;
}
if (mp_unsigned_bin_size(key->pubkey.y) > key->dp->size) {
if (mp_unsigned_bin_size(key->pubkey.x) > key->dp->size) {
err = BAD_FUNC_ARG;
}
}

View File

@ -2668,6 +2668,8 @@ time_t stm32_hal_time(time_t *t1)
RTC_TimeTypeDef time;
RTC_DateTypeDef date;
XMEMSET(tm_time, 0, sizeof(struct tm));
/* order of GetTime followed by GetDate required here due to STM32 HW
* requirement */
HAL_RTC_GetTime(&hrtc, &time, FORMAT_BIN);