[vlc-commits] demux: mp4: fix stack buffer overflow with channels bitmap

Francois Cartegnie git at videolan.org
Thu Jul 21 14:44:04 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jul 21 14:42:24 2016 +0200| [6689dcb688092a909ca9f662e1a061e99f48ec7d] | committer: Francois Cartegnie

demux: mp4: fix stack buffer overflow with channels bitmap

Appens with ambisonic sample.

refs #12002 for regular 5.1 testing

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6689dcb688092a909ca9f662e1a061e99f48ec7d
---

 modules/demux/mp4/essetup.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/demux/mp4/essetup.c b/modules/demux/mp4/essetup.c
index fe64672..ab44945 100644
--- a/modules/demux/mp4/essetup.c
+++ b/modules/demux/mp4/essetup.c
@@ -965,9 +965,8 @@ int SetupAudioES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
                         break;
                     }
                     i_vlc_mapping |= chan_bitmap_mapping[i].i_vlc;
-                    rgi_chans_sequence[i_channels] = chan_bitmap_mapping[i].i_vlc;
+                    rgi_chans_sequence[i_channels++] = chan_bitmap_mapping[i].i_vlc;
                 }
-                i_channels++;
             }
             rgi_chans_sequence[i_channels] = 0;
             p_track->b_chans_reorder = !!



More information about the vlc-commits mailing list