]> git.sesse.net Git - ffmpeg/commit
avfilter/af_headphone: Don't overrun array
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 24 Aug 2020 04:34:17 +0000 (06:34 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 9 Sep 2020 11:46:07 +0000 (13:46 +0200)
commit14226be499d27935d54981f0a6e1b15fd65746cd
tree3285ddc079d93397205fd547205f565c0f0e47c2
parent7b74e02ef2d0099a2e1f1d1cefc1fce2e041f618
avfilter/af_headphone: Don't overrun array

The headphone filter stores the channel position of the ith HRIR stream
in the ith element of an array of 64 elements; but because there is no
check for duplicate channels, it is easy to write beyond the end of the
array by simply repeating channels.

This commit adds a check for duplicate channels to rule this out.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavfilter/af_headphone.c