On Mon, 23 Aug 2021 21:06:05 +0200, sujith kumar reddy wrote: > > Hi Folkert, > > Tried with the above code.This is also getting p value negative. > > My point is p is negative it doesn't go to > > if (p >= bar_length) > p = bar_length - 1; > it is going to memset second argument p,that is negative so crashing. Gah, the code there contains lots of craps. A negative value must not have been passed there. Below is a series of fixes. Please give it a try. thanks, Takashi
Attachment:
0001-aplay-Fix-conversion-of-unsigned-samples-in-peak-cal.patch
Description: Binary data
Attachment:
0002-aplay-Handle-16bit-sample-negative-overflow-in-peak-.patch
Description: Binary data
Attachment:
0003-aplay-Don-t-pass-most-negative-integer-to-abs-in-pea.patch
Description: Binary data
Attachment:
0004-aplay-Handle-upper-bound-in-peak-calculations.patch
Description: Binary data
Attachment:
0005-aplay-Fix-out-of-bound-access-in-stereo-VU-meter-dra.patch
Description: Binary data