Skip to content

Fix #3033: Increase array bounds and test for overflow#3042

Merged
hathach merged 3 commits intohathach:masterfrom
rppicomidi:fix_3033
Mar 21, 2025
Merged

Fix #3033: Increase array bounds and test for overflow#3042
hathach merged 3 commits intohathach:masterfrom
rppicomidi:fix_3033

Conversation

@rppicomidi
Copy link
Copy Markdown
Contributor

Describe the PR
See issue #3033

Additional context
See issue #3033

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))
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you put an bracket for if() { }

@hathach
Copy link
Copy Markdown
Owner

hathach commented Mar 21, 2025

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

default:
break;
cable_sysex_in_progress &= (uint16_t) ~cable_mask;

image

@rppicomidi
Copy link
Copy Markdown
Contributor Author

@hathach Good catch on line 594! Yes, that statement is out of place. Will fix it.

Copy link
Copy Markdown
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect, thank you

@hathach hathach merged commit cf76af1 into hathach:master Mar 21, 2025
108 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants