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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/23/2011 02:31 AM, Antti Palosaari wrote:
On 07/23/2011 02:01 AM, HoP wrote:
2011/7/23 Antti Palosaari<crope@xxxxxx>:
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_tuner_i2c_xfer() gets msg[] parameter
with only one element, true? If so, then my patch is correct.

Yes it is true but nonsense. It is also wrong to make always msg2 as two
element array too, but those are just simpler and generates most likely
some code less. Could you see it can cause problem in some case?

Now I thought it more, could it crash if it point out of memory area?


regards
Antti

--
http://palosaari.fi/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux