Re: [PATCH 1/4] Staging: most: fix bad min() casting

2015-07-28 Thread Dan Carpenter
On Tue, Jul 28, 2015 at 05:16:08PM +0200, Christian Gromm wrote: > This patch fixes wrong casting. A high value of "len" is casted to > negative and thus the minimum resulting in memory corruption. > It can't actually though, because it's capped at a PAGE_SIZE, I think. Pretty much all kernel rea

[PATCH 1/4] Staging: most: fix bad min() casting

2015-07-28 Thread Christian Gromm
This patch fixes wrong casting. A high value of "len" is casted to negative and thus the minimum resulting in memory corruption. Reported-by: Dan Carpenter Signed-off-by: Christian Gromm --- drivers/staging/most/mostcore/core.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff