Eric Wong <normalper...@yhbt.net> writes:

> Mans Rullgard <m...@mansr.com> wrote:
>> +extern void *lsx_ms_adpcm_alloc(unsigned chans)
>> +{
>> +        return lsx_malloc(chans * sizeof(MsState_t));
>
> Initially I thought this might overflow, but it appears channels
> is capped to UINT16_MAX by the previous patch.
>
> On a side note, lsx_valloc could probably be updated to do
> overflow checking and we could use it here to make future
> auditing/review easier.

We should probably also put a global cap on number of channels.

-- 
Måns Rullgård

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel

Reply via email to