Commit Graph

120 Commits

Author SHA1 Message Date
gullradriel 0271feca44 use calloc instead of malloc, avoid setting variables to zero after 2026-02-12 00:18:49 +01:00
gullradriel 20a1860395 make aut64_pack compilation optional, as it's not (yet?) used in the code 2026-02-11 23:38:04 +01:00
gullradriel ecdee5cf1e make validations optionnal 2026-02-11 23:18:25 +01:00
gullradriel d2c153a5c6 make aut64 validations optional via a define 2026-02-11 23:04:33 +01:00
gullradriel 6e01796a95 Use updated aut64 API, catch errors 2026-02-11 22:42:40 +01:00
gullradriel 7196583200 - API now returns status codes instead of void
- aut64_encrypt/decrypt/pack/unpack now return int
- API now uses pointers everywhere
- Made 0xFF sentinel meaningful
- Strict key validation added and enforced
- aut64_encrypt, aut64_decrypt, and aut64_pack fail fast if the key is invalid
- aut64_unpack() unpacks into dest, then validates the resulting key
- Pointer validation for public API functions
- Removed sizeof(...) loop bounds and replaced with defined sizes
- Avoid reading uninitialized memory / overwriting incorrectly
- Converted hardcoded message[7] to message[AUT64_BLOCK_SIZE - 1].
- Upgraded internal array dimensions to use defines
2026-02-11 22:42:05 +01:00
gullradriel 695d9c3d46 rename AUT64_KEY_STRUCT_PACKED_SIZE to AUT64_PACKED_KEY_SIZE as the size is not the struct size but the packed key size 2026-02-11 16:28:12 +01:00
gullradriel 2b65d3e135 format + define helpers description 2026-02-11 11:21:28 +01:00
gullradriel 08d27354a5 fix risky/bon-portable 'inline' usage. Follow flipper zero codebase that mainly use static inline in headers for short functions, which guarantee that it will be inlined 2026-02-11 11:19:51 +01:00
gullradriel 06521f8329 return UNKNOWN if no preset name is given 2026-02-11 11:07:35 +01:00
MX aea05d475c fix kia v2 crc 2026-02-11 04:53:09 +03:00
MX 092d1370d3 fix missing define checks and logs removal 2026-02-10 23:46:32 +03:00
gullradriel ee2e004b3a update from main 2026-02-09 21:44:56 +01:00
MX d82c4df166 apply code formatting and make app even smaller 2026-02-09 23:36:27 +03:00
gullradriel fd6ba8aaff change furi_assert to furi_check 2026-02-09 21:35:58 +01:00
gullradriel c644b1bbf8 indent code 2026-02-09 20:43:57 +01:00
MX db1fe3c6cf Revert "fix vag variable allocation"
This reverts commit c0fbaec4d5.
2026-02-09 17:22:45 +03:00
MX 08ce4003fa Revert "use generic struct in psa"
This reverts commit 17e60cd38e.
2026-02-09 17:22:30 +03:00
MX 17e60cd38e use generic struct in psa 2026-02-09 17:01:58 +03:00
MX 7770143097 fix most of the issues
- fix alloc / free
- fix raw file reading buffer size
- remake raw file reading logic
- remake sub decode to stop when heap is low
- disable 2 scenes to free heap
- add comments
- fix crashes caused by previous alloc/free fixes
- alloc worker only for RX
- fix emulation scene hold
- fix emulation scene back button
2026-02-09 16:47:10 +03:00
MX c0fbaec4d5 fix vag variable allocation 2026-02-09 12:54:18 +03:00
MX c14e75cc64 cut vag upload size 2026-02-09 11:30:53 +03:00
RocketGod c6f3b947ad Fix memory management and state handling 2026-02-08 22:53:31 -08:00
MMX 767bddf94b Merge branch 'main' into zero-mega 2026-02-06 16:36:53 -05:00
zero-mega 506ec6ac40 fix VAG encoder 2026-02-05 18:25:41 +01:00
0mega 8a7759108b Vag Encoder WIP 2026-02-04 07:41:12 +01:00
MX 74b8f629a4 Merge branch 'somefixes' into rw_ui_and_improvement 2026-02-03 17:58:22 +03:00
MX bd47a1d290 fix protocol naming 2026-02-03 17:58:15 +03:00
MX 54bb63bc73 Merge branch 'somefixes' into rw_ui_and_improvement 2026-02-03 17:44:38 +03:00
MX f1f59165d6 naming fixes 2026-02-03 17:44:34 +03:00
MX c084750cf3 add changes by @RalphWiggum 2026-02-03 17:09:09 +03:00
MX bb11afce9b WIP vag combo by @zero-mega
with PSA fixes
2026-02-03 00:15:36 +03:00
MX af51c142c8 Merge branch 'zmg_vw' into pp_main 2026-01-31 11:14:04 +03:00
RocketGod 11253a9f81 Fix memory issues and crashes 2026-01-30 17:12:54 -08:00
MX b422766a05 add vw crypto
by zero-mega and slackware
2026-01-29 06:02:24 +03:00
MX 833910e833 fix array init 2026-01-27 03:35:16 +03:00
MX a50067aed8 Merge branch 'rg_main' into zm 2026-01-27 03:26:05 +03:00
MX 9426369965 Fixes and final touches 2026-01-27 03:17:49 +03:00
RocketGod b69c23ac19 Refactor storage and radio initialization logic
Removes the file list cache and related logic from protopirate_storage, deferring file browsing to the dialogs file browser. Refactors radio initialization and deinitialization to be performed on-demand in relevant scenes, reducing memory usage and improving modularity. Updates scene logic to use the new file browser and radio management, and adds detailed logging and memory usage tracking for debugging. Also includes minor formatting and heap logging improvements. Will leave logging until we don't need it anymore.
2026-01-26 10:14:25 -08:00
zero-mega b76d1e7dbc Add PSA Encoder 2026-01-26 18:54:57 +01:00
RocketGod 55e8068ed3 Remove mutex usage and simplify file storage logic
Eliminated all mutex-based locking and re-entrancy logic from protopirate_storage.c, simplifying file list management and related functions. Reduced MAX_FILES_TO_DISPLAY to 30 and shortened file entry name buffer. Updated file list builder to allocate and free memory as needed, and added yielding in file enumeration to prevent watchdog lockups. In protopirate_scene_saved.c, limited displayed items to 20 and added GUI yield to prevent lockup. Reduced encoder upload buffer size from 1024 to 512 in fiat_v0.c and ford_v0.c.
2026-01-25 22:22:45 -08:00
RocketGod 8ed8e44b38 Reduce encoder upload buffer size to 1024
Decreased the encoder.size_upload value from 2048 to 1024 in both fiat_v0 and ford_v0 protocol implementations to optimize memory usage.
2026-01-23 18:02:42 -08:00
MMX 45b635e291 Merge pull request #76 from zero-mega/main
Add PSA Decoder decryption (Direct and Bruteforce)
2026-01-23 16:21:15 +03:00
MMX 9454fa821a Merge pull request #75 from LeeroysHub/pr_update_bs_crc
FORD: Update PSF with new BS and CRC after TX
2026-01-23 16:20:59 +03:00
MMX fbf2f62224 Merge pull request #71 from LeeroysHub/PR_Ford_Display
Add BS Magic to Saved Info View, make visible in Received.
2026-01-23 16:20:31 +03:00
MMX dc8ea60d06 Merge pull request #70 from LeeroysHub/PR_Ford_BS_Overflow
Incorrect BS when result overflows.
2026-01-23 16:20:18 +03:00
zero-mega 55d61568e0 Add PSA Decoder decryption (Direct and Bruteforce) 2026-01-22 15:39:48 +01:00
Leeroy 8d2163c628 FORD: Update PSF with new BS and CRC after TX 2026-01-22 23:21:49 +11:00
RocketGod 67c896dc81 Add optional debug logging for bit-level operations
Introduced the FORD_V0_DEBUG_BITS macro to enable detailed debug logging of each bit processed in the Ford V0 protocol decoder. Logging is wrapped in a preprocessor check to avoid performance impact unless explicitly enabled.
2026-01-21 18:38:54 -08:00
Leeroy 1823d6438e Moved Receiver Info around so BS Magic isnt off-screen.
* Added spaces for easier viewing
* Swap BS Magic and Btn so BS Magic always fits
2026-01-21 17:07:14 +11:00