mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
dtsdec: fix buffer overflows
Channels can be up to 7. Also add a guard in case more can be returned in the future. Coverity 1139820, 1139821
This commit is contained in:
parent
e12646f30a
commit
57a138df86
1 changed files with 2 additions and 2 deletions
|
@ -400,12 +400,12 @@ gst_dtsdec_renegotiate (GstDtsDec * dts)
|
|||
{
|
||||
gint channels;
|
||||
gboolean result = FALSE;
|
||||
GstAudioChannelPosition from[6], to[6];
|
||||
GstAudioChannelPosition from[7], to[7];
|
||||
GstAudioInfo info;
|
||||
|
||||
channels = gst_dtsdec_channels (dts->using_channels, from);
|
||||
|
||||
if (!channels)
|
||||
if (channels <= 0 || channels > 7)
|
||||
goto done;
|
||||
|
||||
GST_INFO_OBJECT (dts, "dtsdec renegotiate, channels=%d, rate=%d",
|
||||
|
|
Loading…
Reference in a new issue