You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ar...@apache.org on 2021/07/20 06:20:36 UTC

[incubator-nuttx] branch master updated: iob_trimhead: fix an integer truncation

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

archer 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 7a580ae  iob_trimhead: fix an integer truncation
7a580ae is described below

commit 7a580ae3bc7fa559c2abd4d8dca806ed6b9230d4
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Jul 20 14:04:31 2021 +0900

    iob_trimhead: fix an integer truncation
    
    I guess this fixes https://github.com/apache/incubator-nuttx/issues/4181
---
 mm/iob/iob_trimhead.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/iob/iob_trimhead.c b/mm/iob/iob_trimhead.c
index 602ad68..db72bc6 100644
--- a/mm/iob/iob_trimhead.c
+++ b/mm/iob/iob_trimhead.c
@@ -55,7 +55,7 @@
 FAR struct iob_s *iob_trimhead(FAR struct iob_s *iob, unsigned int trimlen,
                                enum iob_user_e producerid)
 {
-  uint16_t pktlen;
+  unsigned int pktlen;
 
   iobinfo("iob=%p trimlen=%d\n", iob, trimlen);