[FL-2431, FL-2419] SubGhz: bugfixes (#1098)
* [FL-2431] SubGhz: fix Restart with an error (HardFault), while maintaining the RAW signal. * Stream: fix adding maximum string length to arguments * [FL-2419] SubGhz: fix flipper hang/Fatal Error when running edited Sub-GHz file. * SubGhz: remove replace strcpy with strncpy, smaller text buffer and canary * SubGhz: log key loading before load happen, rollback only rx message handling Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -56,7 +56,7 @@ bool subghz_scene_delete_raw_on_event(void* context, SceneManagerEvent event) {
|
||||
SubGhz* subghz = context;
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == SubGhzCustomEventSceneDeleteRAW) {
|
||||
strcpy(subghz->file_name_tmp, subghz->file_name);
|
||||
strncpy(subghz->file_name_tmp, subghz->file_name, SUBGHZ_MAX_LEN_NAME);
|
||||
if(subghz_delete_file(subghz)) {
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneDeleteSuccess);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user