Skip to content

Commit eabef50

Browse files
nikolaptrfabiobaltieri
authored andcommitted
drivers: input: sbus: Fix SBUS parser overflow
SBUS parser discards portion of the received data, this is a result of SBUS parser intermediate variable overflow. Fix by changing said variable type to uint32_t. Signed-off-by: Nikola Petrovic <nikolaptr6@gmail.com>
1 parent 0ec0b3c commit eabef50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/input_sbus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static void input_sbus_input_report_thread(const struct device *dev, void *dummy
123123

124124
uint8_t i, channel;
125125
uint8_t *sbus_channel_data = &data->sbus_frame[1]; /* Omit header */
126-
uint16_t value;
126+
uint32_t value;
127127
int bits_read;
128128
unsigned int key;
129129
int ret;

0 commit comments

Comments
 (0)