Commit 9b2eed6
committed
shared/tinyusb: Fix interrupt char check for disabled state.
Add check for mp_interrupt_char >= 0 before calling memchr() to avoid
false matches when interrupt character detection is disabled (mp_interrupt_char == -1).
When mp_interrupt_char is -1, memchr() would search for 0xFF which could
cause spurious keyboard interrupts if binary data containing 0xFF is
transferred over USB-CDC.
Signed-off-by: Andrew Leech <[email protected]>1 parent 7735584 commit 9b2eed6
File tree
1 file changed
+18
-16
lines changed1 file changed
+18
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
109 | 110 | | |
110 | | - | |
111 | | - | |
| 111 | + | |
| 112 | + | |
112 | 113 | | |
113 | | - | |
114 | | - | |
| 114 | + | |
| 115 | + | |
115 | 116 | | |
116 | | - | |
117 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
| |||
0 commit comments