Merge pull request #5675 from embhorn/zd14968

Fix coverity issues
This commit is contained in:
David Garske 2022-10-25 10:08:40 -07:00 committed by GitHub
commit d052feeff2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);