From fa5daea3d9ca520a063197761b2855067a5ad171 Mon Sep 17 00:00:00 2001 From: Masayuki Ishikawa Date: Tue, 13 Apr 2021 18:27:09 +0900 Subject: [PATCH] drivers: wireless: Fix to receive a UDP packet partially in gs2200m.c Summary: - When receiving a UDP packet partially, the rest of the packet must be discarded. Impact: - None Testing: - Tested with a UDP sample program Reported-by: Masatoshi Ueno Signed-off-by: Masayuki Ishikawa --- drivers/wireless/gs2200m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/wireless/gs2200m.c b/drivers/wireless/gs2200m.c index ac5f84e1e7..6ec0f0c8f2 100644 --- a/drivers/wireless/gs2200m.c +++ b/drivers/wireless/gs2200m.c @@ -650,7 +650,7 @@ static bool _copy_data_from_pkt(FAR struct gs2200m_dev_s *dev, pkt_dat->remain -= len; - if (0 == pkt_dat->remain) + if (0 == pkt_dat->remain || TYPE_BULK_DATA_UDP == pkt_dat->type) { _remove_and_free_pkt(dev, c); }