Thread (3 messages) 3 messages, 3 authors, 2017-08-24

Re: [PATCH] rtlwifi: make a couple arrays larger

From: Larry Finger <hidden>
Date: 2017-08-18 13:09:43
Also in: kernel-janitors

On 08/18/2017 03:05 AM, Dan Carpenter wrote:
This is a static checker fix.  "cal_num" is 10.  We're declaring the
tx_dt[] and rx_td[] arrays as 3 element arrays.  The static checker
complains that we do:

	tx_dt[cal] = (vdf_y[1]>>20)-(vdf_y[0]>>20);

"cal" is the iterator and it is in the 0-9 range so it looks like
we could corrupt memory.

Signed-off-by: Dan Carpenter <redacted>
---
I'm pretty sure this patch is correct and absolutely harmless.  But the
code is pretty involved and I didn't test it.  So you may want to review
this one carefully.
I believe the patch is correct. In testing, I also confirmed that this branch is 
executed, thus the memory corruption does happen.

Acked-by: Larry Finger <redacted>

Thanks,

Larry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help