nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerpe...@apache.org
Subject [incubator-nuttx-apps] branch master updated: wireless: gs2200m: Fix to receive a big packet
Date Mon, 18 May 2020 07:44:49 GMT
This is an automated email from the ASF dual-hosted git repository.

jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new e2414cd  wireless: gs2200m: Fix to receive a big packet
e2414cd is described below

commit e2414cd731b489ffa7aab6319983da416a4edf82
Author: Masayuki Ishikawa <masayuki.ishikawa@gmail.com>
AuthorDate: Mon May 18 14:51:32 2020 +0900

    wireless: gs2200m: Fix to receive a big packet
    
    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
---
 wireless/gs2200m/gs2200m_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/wireless/gs2200m/gs2200m_main.c b/wireless/gs2200m/gs2200m_main.c
index c818829..6667b6c 100644
--- a/wireless/gs2200m/gs2200m_main.c
+++ b/wireless/gs2200m/gs2200m_main.c
@@ -865,7 +865,9 @@ static int recvfrom_request(int fd, FAR struct gs2200m_s *priv,
     }
 
   memset(&rmsg, 0, sizeof(rmsg));
-  rmsg.buf = calloc(1, 1500);
+  rmsg.buf = calloc(1, req->max_buflen);
+  ASSERT(rmsg.buf);
+
   rmsg.cid = usock->cid;
   rmsg.reqlen = req->max_buflen;
   rmsg.is_tcp = (usock->type == SOCK_STREAM) ? true : false;


Mime
View raw message