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

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


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

podcast: fix invalid cast / aliasing violation

(cherry picked from commit 1c1f5a071ac8356e6455078f30e0f8c0effa67ec)

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

 modules/demux/playlist/podcast.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/modules/demux/playlist/podcast.c b/modules/demux/playlist/podcast.c
index 7165fdd94a..9be1b08823 100644
--- a/modules/demux/playlist/podcast.c
+++ b/modules/demux/playlist/podcast.c
@@ -55,14 +55,13 @@ int Import_podcast( vlc_object_t *p_this )
         /* XML: check if the root node is "rss". Use a specific peeked
          * probestream in order to not modify the source state while probing.
          * */
-        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 );
+            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