1
mirror of https://github.com/flipperdevices/flipperzero-firmware.git synced 2025-12-12 04:41:26 +04:00

Fix various crashes if debug libraries used (#3144)

* FuriHal: enable HSI in stop mode only if we use STOP0, proper SMPS selected clock assert

* Furi: fix double crash caused by bkpt use outside of debug session

* Libs: update ERC and MGG contrast

* Fix various crashes with LIB_DEBUG=1

* BadUsb: size_t where it should be and proper printf types

* Various fixes and make PVS happy

* FuriHal: proper CCID status and make PVS happy

* boot: update mode: graceful handling of corrupted stage file

---------

Co-authored-by: hedger <hedger@nanode.su>
This commit is contained in:
あく
2023-10-13 01:34:30 +09:00
committed by GitHub
parent 38792f2c93
commit f45a5dff43
17 changed files with 47 additions and 42 deletions

View File

@@ -853,7 +853,7 @@ ElfProcessSectionResult elf_process_section(
if(process_section(elf->fd, section_header.sh_offset, section_header.sh_size, context)) {
result = ElfProcessSectionResultSuccess;
} else {
result = ElfProcessSectionResultCannotProcess;
result = ElfProcessSectionResultCannotProcess; //-V1048
}
}

View File

@@ -6,7 +6,7 @@
extern "C" {
#endif
DICT_DEF2(AddressCache, int, M_DEFAULT_OPLIST, Elf32_Addr, M_DEFAULT_OPLIST)
DICT_DEF2(AddressCache, int, M_DEFAULT_OPLIST, Elf32_Addr, M_DEFAULT_OPLIST) //-V1048
/**
* Callable elf entry type

View File

@@ -118,7 +118,6 @@ void lfrfid_worker_start_thread(LFRFIDWorker* worker) {
}
void lfrfid_worker_stop_thread(LFRFIDWorker* worker) {
furi_assert(worker->mode_index == LFRFIDWorkerIdle);
furi_thread_flags_set(furi_thread_get_id(worker->thread), LFRFIDEventStopThread);
furi_thread_join(worker->thread);
}

View File

@@ -197,7 +197,7 @@ ReturnCode slix_get_random(NfcVData* data) {
}
ReturnCode slix_unlock(NfcVData* data, uint32_t password_id) {
furi_assert(rand);
furi_assert(data);
uint16_t received = 0;
uint8_t rxBuf[32];

View File

@@ -2,8 +2,8 @@
#include <furi_hal.h>
#define CONTRAST_ERC 31
#define CONTRAST_MGG 27
#define CONTRAST_ERC 32
#define CONTRAST_MGG 28
uint8_t u8g2_gpio_and_delay_stm32(u8x8_t* u8x8, uint8_t msg, uint8_t arg_int, void* arg_ptr) {
UNUSED(u8x8);