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/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 94c0f71db9 v4l2m2m: modify return value of g_bufsize to uint32_t
94c0f71db9 is described below

commit 94c0f71db97786bb523a85bd262eb83938f7eeea
Author: yangsen5 <yangs...@xiaomi.com>
AuthorDate: Wed Nov 27 16:49:18 2024 +0800

    v4l2m2m: modify return value of g_bufsize to uint32_t
    
    CID 1578530: (#1 of 1): INTEGER_OVERFLOW
    
    Signed-off-by: yangsen5 <yangs...@xiaomi.com>
---
 arch/sim/src/sim/sim_decoder.c | 8 ++++----
 drivers/video/v4l2_m2m.c       | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/sim/src/sim/sim_decoder.c b/arch/sim/src/sim/sim_decoder.c
index 274e345fc6..c922036e78 100644
--- a/arch/sim/src/sim/sim_decoder.c
+++ b/arch/sim/src/sim/sim_decoder.c
@@ -89,8 +89,8 @@ static int sim_decoder_output_try_fmt(void *priv,
                                       struct v4l2_format *fmt);
 static int sim_decoder_subscribe_event(void *priv,
                                        struct v4l2_event_subscription *sub);
-static size_t sim_decoder_capture_g_bufsize(void *priv);
-static size_t sim_decoder_output_g_bufsize(void *priv);
+static uint32_t sim_decoder_capture_g_bufsize(void *priv);
+static uint32_t sim_decoder_output_g_bufsize(void *priv);
 static int sim_decoder_process(sim_decoder_t *sim_decoder,
                                struct v4l2_buffer *dst_buf,
                                struct v4l2_buffer *src_buf);
@@ -367,7 +367,7 @@ static int sim_decoder_subscribe_event(void *priv,
     }
 }
 
-static size_t sim_decoder_capture_g_bufsize(void *priv)
+static uint32_t sim_decoder_capture_g_bufsize(void *priv)
 {
   sim_decoder_t *sim_decoder = priv;
 
@@ -379,7 +379,7 @@ static size_t sim_decoder_capture_g_bufsize(void *priv)
   return 0;
 }
 
-static size_t sim_decoder_output_g_bufsize(void *priv)
+static uint32_t sim_decoder_output_g_bufsize(void *priv)
 {
   sim_decoder_t *sim_decoder = priv;
 
diff --git a/drivers/video/v4l2_m2m.c b/drivers/video/v4l2_m2m.c
index cc4f7ad19b..1e1efa5e60 100644
--- a/drivers/video/v4l2_m2m.c
+++ b/drivers/video/v4l2_m2m.c
@@ -271,7 +271,7 @@ static int codec_reqbufs(FAR struct file *filep,
   FAR codec_file_t *cfile = filep->f_priv;
   FAR codec_type_inf_t *type_inf;
   irqstate_t flags;
-  size_t buf_size;
+  uint32_t buf_size;
   int ret = OK;
 
   if (reqbufs == NULL)

Reply via email to