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

[incubator-nuttx] branch master updated: drivers: wireless: Fix buffer overrun in gs2200m.c

This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 075334c  drivers: wireless: Fix buffer overrun in gs2200m.c
075334c is described below

commit 075334cfcc7fa1855d97a435a0f104d2861bcc86
Author: Kazuya Hioki <Ka...@sony.com>
AuthorDate: Tue May 26 15:11:52 2020 +0900

    drivers: wireless: Fix buffer overrun in gs2200m.c
    
    Warning ID: 85719.12039200
    
    Reviewed-by: Masayuki Ishikawa <Ma...@jp.sony.com>
    Signed-off-by: Kazuya Hioki <Ka...@sony.com>
---
 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 907ef3c..8d923b5 100644
--- a/drivers/wireless/gs2200m.c
+++ b/drivers/wireless/gs2200m.c
@@ -325,7 +325,7 @@ static uint16_t _to_uint16(char *str)
   uint16_t ret = 0;
   int n;
 
-  n = sscanf(str, "%04d", &ret);
+  n = sscanf(str, "%04hu", &ret);
   ASSERT(1 == n);
   return ret;
 }