[alsa-devel] [PATCH] amixer: add support for TLV byte control read
Vinod Koul
vinod.koul at intel.com
Fri Jan 29 14:53:44 CET 2016
On Fri, Jan 29, 2016 at 02:17:20PM +0100, Takashi Iwai wrote:
> > with this change it works and dumps 4K bytes on my screen
> >
> > @@ -913,6 +913,13 @@ static int skl_tplg_tlv_control_get(struct snd_kcontrol
> > *kcontrol,
> > skl_get_module_params(skl->skl_sst, (u32 *)bc->params,
> > bc->max, bc->param_id, mconfig);
> >
> > + /* decrement size for TLV header */
> > + size -= 2 * sizeof(u32);
>
> The lower bound check is also missing.
>
> if (size < 2 * sizeof(u32))
> return -EINVAL;
I thought core and lib do check this, but yes no harm in adding will do so
Thanks
--
~Vinod
More information about the Alsa-devel
mailing list