[FL-3543] Check the filetype of the update manifest (#3025)
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
parent
809418b9da
commit
7aa55ebc6c
@ -54,10 +54,10 @@ static bool
|
|||||||
|
|
||||||
FuriString* filetype;
|
FuriString* filetype;
|
||||||
|
|
||||||
// TODO FL-3543: compare filetype?
|
|
||||||
filetype = furi_string_alloc();
|
filetype = furi_string_alloc();
|
||||||
update_manifest->valid =
|
update_manifest->valid =
|
||||||
flipper_format_read_header(flipper_file, filetype, &update_manifest->manifest_version) &&
|
flipper_format_read_header(flipper_file, filetype, &update_manifest->manifest_version) &&
|
||||||
|
furi_string_cmp_str(filetype, "Flipper firmware upgrade configuration") == 0 &&
|
||||||
flipper_format_read_string(flipper_file, MANIFEST_KEY_INFO, update_manifest->version) &&
|
flipper_format_read_string(flipper_file, MANIFEST_KEY_INFO, update_manifest->version) &&
|
||||||
flipper_format_read_uint32(
|
flipper_format_read_uint32(
|
||||||
flipper_file, MANIFEST_KEY_TARGET, &update_manifest->target, 1) &&
|
flipper_file, MANIFEST_KEY_TARGET, &update_manifest->target, 1) &&
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user