[alsa-devel] [PATCH v5] ASoC: Apply msbits constraint for sample size bigger than the msbits

Peter Ujfalusi peter.ujfalusi at ti.com
Wed Jan 18 16:49:36 CET 2012


On 01/18/2012 04:43 PM, Peter Ujfalusi wrote:
> On 01/18/2012 04:35 PM, Clemens Ladisch wrote:
>> Peter Ujfalusi wrote:
>>> We run the loop as long as the sample size is bigger than the requested
>>> msbits.
>>
>>> +	while (sample_sizes[i] > bits && i < ARRAY_SIZE(sample_sizes)) {
>>
>> This will overrun sample_sizes[] if bits < 8.
> 
> which is prevented by the: && i < ARRAY_SIZE(sample_sizes)

I take it back. True, we overrun. These need to be swapped.

-- 
Péter


More information about the Alsa-devel mailing list