[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:
Skorpionm
2022-04-07 15:47:47 +04:00
committed by GitHub
parent 321f36d113
commit 02b9cf90d5
11 changed files with 41 additions and 26 deletions

View File

@@ -176,7 +176,7 @@ static bool file_stream_delete_and_insert(
string_t scratch_name;
string_t tmp_name;
string_init(tmp_name);
storage_get_next_filename(_stream->storage, "/any", ".scratch", ".pad", tmp_name);
storage_get_next_filename(_stream->storage, "/any", ".scratch", ".pad", tmp_name, 255);
string_init_printf(scratch_name, "/any/%s.pad", string_get_cstr(tmp_name));
string_clear(tmp_name);