On Wed, Apr 10, 2019 at 01:24:44PM +0200, Hans Verkuil wrote: > On 4/10/19 1:09 PM, Dan Carpenter wrote: > > [ Hi Hans, > > > > This might not really be your bug, but I just respect you a lot and > > so I always come to you with questions and for advice. -dan ] > > Hmm, in other words, I'm too nice! > Indeed. > > 657 if (mxb->cur_audinput != a->index) { > > 658 mxb->cur_audinput = a->index; > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > Now here's the complication. We also use a->index as an index into the > > mxb_inputs[] array which only has MXB_INPUTS (4) elements, so just > > We do? Where does that happen? I don't see that in the code. That would be > a bug since mxb_inputs are the video inputs, whereas s_audio deals with > audio inputs. > Oh, you're right. But then there is a smaller problem because we use it as in index into the mxb_audios[] array and that array only has 6 elements so we're still out of bounds. The bigger array has a mute element at the end. regards, dan carpenter