Staging: most: avoid possible integer overflow
authorChristian Gromm <christian.gromm@microchip.com>
Mon, 3 Aug 2015 11:44:30 +0000 (13:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Aug 2015 00:39:51 +0000 (17:39 -0700)
This patch prevents a potential integer overlow.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/mostcore/core.c

index f872dc0bc118fda828a4d23fbe5a066fbb7ffae7..f4fea8cf5560e69656ab4840c6482a95d1e07081 100644 (file)
@@ -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);
 
This page took 0.02512 seconds and 5 git commands to generate.