diff options
| author | Pengpeng Hou <pengpeng@iscas.ac.cn> | 2026-03-22 11:19:23 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-04-02 15:55:01 +0200 |
| commit | cbc96a916b1a3be7039b0166c0fc56ec1632ba01 (patch) | |
| tree | 632f0bbecc9c41e85569a05e33774ee9f1ffe561 /scripts/stackusage | |
| parent | 8ca3d3b1c3383f5f23efe01c3fd9113ed06007bd (diff) | |
greybus: beagleplay: bound bootloader RX buffer copy
When `flashing_mode` is set, `gb_tty_receive()` routes incoming bytes to
`cc1352_bootloader_rx()`. That helper appends the new bytes to the shared
`rx_buffer` with `memcpy()` but does not check that the chunk fits in the
remaining space first. The normal HDLC receive path already enforces
`MAX_RX_HDLC`, so do the same here before appending bootloader data.
If a packet would overflow the receive buffer, drop it and reset the
bootloader receive state instead of copying past the end of `rx_buffer`.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260322031923.58013-1-pengpeng@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions
