fix(simulator): potential buffer overflow in SD manager - #7521
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
7445578 to
6275987
Compare
|
Works fine on Linux also, will test Windows once the merge build is done as caching needed to be disabled due to an upstream bug before Windows builds consistently work again for 2.12. This also resolves an issue where |
When browsing the radio storage card in the SD manager the 'getFullPath' function may overflow the 'full_path' string in the simulator.
The 'f_chdir' function does not correctly handle '..' when passed as the filename so the current path continues to grow - e.g. after navigating a few folders it may look like //BACKUP/../SOUNDS/en/../../FIRMWARE. Eventually this will overflow the full_path buffer.
Seen in MacOS, not tested on Linux or Window. Does not happen on the radio; but the fix will work for all cases.
PR #7485 fixes the issue for 3.0.