libopusdec: default to stereo for invalid number of channels
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Mon, 14 Nov 2016 20:41:45 +0000 (21:41 +0100)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Sat, 26 Nov 2016 23:28:08 +0000 (00:28 +0100)
commite70caba38480f11043963bb5eb150cfb2eebd41b
tree76da931f0dcc4f890a171ad231b7b1b7a8067bc2
parentd0f8741a5a29e6381894fe5eacbeb9145a965b6c
libopusdec: default to stereo for invalid number of channels

This fixes an out-of-bounds read if avc->channels is 0.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 8c8f543b81aa2b50bb6a6cfd370a0061281492a3)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavcodec/libopusdec.c