[vlc-commits] wpl: fix invalid cast / aliasing violation

Rémi Denis-Courmont git at videolan.org
Sat Dec 2 22:27:16 CET 2017


vlc/vlc-3.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Dec  2 23:12:22 2017 +0200| [19efb2ec4acee33c25d9803b5745d91a9f5172cd] | committer: Rémi Denis-Courmont

wpl: fix invalid cast / aliasing violation

(cherry picked from commit b6fc7cbd76a7b37e1274f65485926c14d928c4e5)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=19efb2ec4acee33c25d9803b5745d91a9f5172cd
---

 modules/demux/playlist/wpl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/demux/playlist/wpl.c b/modules/demux/playlist/wpl.c
index f90918fb8b..5db23be7f5 100644
--- a/modules/demux/playlist/wpl.c
+++ b/modules/demux/playlist/wpl.c
@@ -284,12 +284,12 @@ int Import_WPL( vlc_object_t* p_this )
         !stream_HasExtension( p_demux, ".zpl" ) )
         return VLC_EGENERIC;
 
-    uint8_t *p_peek;
-    ssize_t i_peek = vlc_stream_Peek( p_demux->p_source, (const uint8_t **) &p_peek, 2048 );
+    const uint8_t *p_peek;
+    ssize_t i_peek = vlc_stream_Peek( p_demux->p_source, &p_peek, 2048 );
     if( unlikely( i_peek <= 0 ) )
         return VLC_EGENERIC;
 
-    stream_t *p_probestream = vlc_stream_MemoryNew( p_demux->p_source, p_peek, i_peek, true );
+    stream_t *p_probestream = vlc_stream_MemoryNew( p_demux->p_source, (uint8_t *)p_peek, i_peek, true );
     if( unlikely( !p_probestream ) )
         return VLC_EGENERIC;
 



More information about the vlc-commits mailing list