Repository navigation
PR2457 with suggested fixes - #2500
Merged
Merged
Conversation
WriteResponse has no default member initialisers and both write handlers assigned status on only one branch, so the other returned uninitialised stack memory to the client over BLE: - commands::WRITE assigned status only on success, so a failed FileOpen reported garbage. The ternary was also dead code, as res is known to be 0 inside that branch. - commands::WRITE_DATA assigned status only on failure, so every successful chunk reported garbage, which readily looks like a negative LittleFS error code. Value-initialise both, matching DelResponse, MKDirResponse and ListDirResponse in the same file, and assign status on both paths. The visible symptom is a companion app reporting a file transfer error against a watch that is writing the file correctly.
|
Build size and comparison to main:
|
mark9064
approved these changes
Nov 2, 2026
Member
|
Please note the AI generated commit message was removed as it was against the AI policy Also because it didn't add anything beyond the commit message :) Thanks for picking this PR up |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With @JoeStrout's permission (I have contacted him via e-mail and he told he probably couldn't get to this until the
week after next), here is his commit from #2457 with @NeroBurner's suggestion.