You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by je...@apache.org on 2020/05/18 07:44:49 UTC

[incubator-nuttx-apps] branch master updated: wireless: gs2200m: Fix to receive a big packet

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 <ma...@gmail.com>
AuthorDate: Mon May 18 14:51:32 2020 +0900

    wireless: gs2200m: Fix to receive a big packet
    
    Signed-off-by: Masayuki Ishikawa <Ma...@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;