Fix #3033: Increase array bounds and test for overflow#3042
Merged
hathach merged 3 commits intohathach:masterfrom Mar 21, 2025
Merged
Fix #3033: Increase array bounds and test for overflow#3042hathach merged 3 commits intohathach:masterfrom
hathach merged 3 commits intohathach:masterfrom
Conversation
hathach
reviewed
Mar 21, 2025
src/class/midi/midi_host.c
Outdated
| tu_desc_subtype(p_desc) == MIDI_CS_INTERFACE_IN_JACK ? "IN" : "OUT", | ||
| p_desc[3] == MIDI_JACK_EXTERNAL ? "External" : "Embedded"); | ||
| desc_cb.desc_jack[desc_cb.jack_num++] = p_desc; | ||
| if (desc_cb.jack_num < TU_ARRAY_SIZE(desc_cb.desc_jack)) |
Owner
There was a problem hiding this comment.
can you put an bracket for if() { }
Owner
|
I also notice at line 594 the statement is out of place, it is either part or default of get the wrong indent, would you mind double checkinging it. Thank you tinyusb/src/class/midi/midi_host.c Lines 592 to 594 in 4b46493 |
Contributor
Author
|
@hathach Good catch on line 594! Yes, that statement is out of place. Will fix it. |
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.

Describe the PR
See issue #3033
Additional context
See issue #3033