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

[FL-3543] Check the filetype of the update manifest (#3025)

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Astra
2023-09-01 10:47:02 +09:00
committed by GitHub
parent 809418b9da
commit 7aa55ebc6c

View File

@@ -54,10 +54,10 @@ static bool
FuriString* filetype;
// TODO FL-3543: compare filetype?
filetype = furi_string_alloc();
update_manifest->valid =
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_uint32(
flipper_file, MANIFEST_KEY_TARGET, &update_manifest->target, 1) &&