Re: [PATCH] cxd2820r: fix possible out-of-array lookup

2011-07-25 Thread HoP
Hi Antti 2011/7/23 Antti Palosaari : > On 07/23/2011 02:01 AM, HoP wrote: >> >> 2011/7/23 Antti Palosaari: >>> >>> On 07/23/2011 01:47 AM, HoP wrote: 2011/7/23 Antti Palosaari: > > On 07/23/2011 01:18 AM, HoP wrote: >> >> In case of i2c write operation there is only one e

Re: [PATCH] cxd2820r: fix possible out-of-array lookup

2011-07-23 Thread HoP
2011/7/23 Malcolm Priestley : > On Sat, 2011-07-23 at 01:47 +0200, HoP wrote: >> 2011/7/23 Antti Palosaari : >> > On 07/23/2011 02:31 AM, Antti Palosaari wrote: >> >> >> >> On 07/23/2011 02:01 AM, HoP wrote: >> >>> >> >>> 2011/7/23 Antti Palosaari: >> >> But now I see what you mean. msg2[

Re: [PATCH] cxd2820r: fix possible out-of-array lookup

2011-07-23 Thread Malcolm Priestley
On Sat, 2011-07-23 at 01:47 +0200, HoP wrote: > 2011/7/23 Antti Palosaari : > > On 07/23/2011 02:31 AM, Antti Palosaari wrote: > >> > >> On 07/23/2011 02:01 AM, HoP wrote: > >>> > >>> 2011/7/23 Antti Palosaari: > > But now I see what you mean. msg2[1] is set as garbage fields in case of >

Re: [PATCH] cxd2820r: fix possible out-of-array lookup

2011-07-22 Thread HoP
2011/7/23 Antti Palosaari : > On 07/23/2011 02:31 AM, Antti Palosaari wrote: >> >> On 07/23/2011 02:01 AM, HoP wrote: >>> >>> 2011/7/23 Antti Palosaari: But now I see what you mean. msg2[1] is set as garbage fields in case of incoming msg len is 1. True, but it does not harm since it

Re: [PATCH] cxd2820r: fix possible out-of-array lookup

2011-07-22 Thread Antti Palosaari
On 07/23/2011 02:31 AM, Antti Palosaari wrote: On 07/23/2011 02:01 AM, HoP wrote: 2011/7/23 Antti Palosaari: But now I see what you mean. msg2[1] is set as garbage fields in case of incoming msg len is 1. True, but it does not harm since it is not used in that case. In case of write, cxd2820r

Re: [PATCH] cxd2820r: fix possible out-of-array lookup

2011-07-22 Thread Antti Palosaari
On 07/23/2011 02:01 AM, HoP wrote: 2011/7/23 Antti Palosaari: On 07/23/2011 01:47 AM, HoP wrote: 2011/7/23 Antti Palosaari: On 07/23/2011 01:18 AM, HoP wrote: In case of i2c write operation there is only one element in msg[] array. Don't access msg[1] in that case. NACK. I suspect you co

Re: [PATCH] cxd2820r: fix possible out-of-array lookup

2011-07-22 Thread HoP
2011/7/23 Antti Palosaari : > On 07/23/2011 01:47 AM, HoP wrote: >> >> 2011/7/23 Antti Palosaari: >>> >>> On 07/23/2011 01:18 AM, HoP wrote: In case of i2c write operation there is only one element in msg[] array. Don't access msg[1] in that case. >>> >>> NACK. >>> I suspect you conf

Re: [PATCH] cxd2820r: fix possible out-of-array lookup

2011-07-22 Thread Antti Palosaari
On 07/23/2011 01:47 AM, HoP wrote: 2011/7/23 Antti Palosaari: On 07/23/2011 01:18 AM, HoP wrote: In case of i2c write operation there is only one element in msg[] array. Don't access msg[1] in that case. NACK. I suspect you confuse now local msg2 and msg that is passed as function parameter.

Re: [PATCH] cxd2820r: fix possible out-of-array lookup

2011-07-22 Thread HoP
2011/7/23 Antti Palosaari : > On 07/23/2011 01:18 AM, HoP wrote: >> >> In case of i2c write operation there is only one element in msg[] array. >> Don't access msg[1] in that case. > > NACK. > I suspect you confuse now local msg2 and msg that is passed as function > parameter. Could you double chec

Re: [PATCH] cxd2820r: fix possible out-of-array lookup

2011-07-22 Thread Antti Palosaari
On 07/23/2011 01:18 AM, HoP wrote: In case of i2c write operation there is only one element in msg[] array. Don't access msg[1] in that case. NACK. I suspect you confuse now local msg2 and msg that is passed as function parameter. Could you double check and explain? regards Antti Signed-

[PATCH] cxd2820r: fix possible out-of-array lookup

2011-07-22 Thread HoP
In case of i2c write operation there is only one element in msg[] array. Don't access msg[1] in that case. Signed-off-by: Honza Petrous -- diff -uBbp cxd2820r_core.c.orig cxd2820r_core.c --- cxd2820r_core.c.orig2011-07-22 23:31:56.319168405 +0200 +++ cxd2820r_core.c 2011-07-22 23:35