[vlc-commits] mkv: do not dereference unaligned pointer
Rémi Denis-Courmont
git at videolan.org
Thu Jul 11 21:16:24 CEST 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 11 22:11:19 2019 +0300| [37b8947693e5f9445944086a810d74d298e2847f] | committer: Rémi Denis-Courmont
mkv: do not dereference unaligned pointer
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=37b8947693e5f9445944086a810d74d298e2847f
---
modules/demux/mkv/matroska_segment_parse.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index c52845bdee..55c3027136 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -1860,8 +1860,10 @@ bool matroska_segment_c::TrackInit( mkv_track_t * p_tk )
if( p_wf->wFormatTag == WAVE_FORMAT_EXTENSIBLE &&
p_tk->i_extra_data >= sizeof(WAVEFORMATEXTENSIBLE) )
{
- WAVEFORMATEXTENSIBLE * p_wext = (WAVEFORMATEXTENSIBLE*) p_wf;
- sf_tag_to_fourcc( &p_wext->SubFormat, &p_tk->fmt.i_codec, NULL);
+ WAVEFORMATEXTENSIBLE *p_wext = (WAVEFORMATEXTENSIBLE*)p_wf;
+ GUID subFormat = p_wext->SubFormat;
+
+ sf_tag_to_fourcc( &subFormat, &p_tk->fmt.i_codec, NULL);
/* FIXME should we use Samples */
if( p_tk->fmt.audio.i_channels > 2 &&
More information about the vlc-commits
mailing list