arecord is failing with -V stereo

Takashi Iwai tiwai at suse.de
Tue Aug 24 10:12:52 CEST 2021


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-aplay-Fix-conversion-of-unsigned-samples-in-peak-cal.patch
Type: application/octet-stream
Size: 1540 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20210824/bcd66f18/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-aplay-Handle-16bit-sample-negative-overflow-in-peak-.patch
Type: application/octet-stream
Size: 1136 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20210824/bcd66f18/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-aplay-Don-t-pass-most-negative-integer-to-abs-in-pea.patch
Type: application/octet-stream
Size: 915 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20210824/bcd66f18/attachment-0007.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-aplay-Handle-upper-bound-in-peak-calculations.patch
Type: application/octet-stream
Size: 802 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20210824/bcd66f18/attachment-0008.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-aplay-Fix-out-of-bound-access-in-stereo-VU-meter-dra.patch
Type: application/octet-stream
Size: 1087 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20210824/bcd66f18/attachment-0009.obj>


More information about the Alsa-devel mailing list