[PATCH] Staging: most: avoid possible integer overflow
Christian Gromm
christian.gromm at microchip.com
Mon Aug 3 11:44:30 UTC 2015
This patch prevents a potential integer overlow.
Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
Signed-off-by: Christian Gromm <christian.gromm at microchip.com>
---
drivers/staging/most/mostcore/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/most/mostcore/core.c b/drivers/staging/most/mostcore/core.c
index f872dc0..f4fea8c 100644
--- a/drivers/staging/most/mostcore/core.c
+++ b/drivers/staging/most/mostcore/core.c
@@ -1260,7 +1260,7 @@ int arm_mbo_chain(struct most_c_obj *c, int dir, void (*compl)(struct mbo *))
unsigned int i;
int retval;
struct mbo *mbo;
- u16 coherent_buf_size = c->cfg.buffer_size + c->cfg.extra_len;
+ u32 coherent_buf_size = c->cfg.buffer_size + c->cfg.extra_len;
atomic_set(&c->mbo_nq_level, 0);
--
1.7.9.5
More information about the devel
mailing list