[vlc-devel] commit: Don't use strcpy() on overlapping memory buffers - fixes #1500 ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu Mar 20 18:08:36 CET 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Thu Mar 20 19:08:30 2008 +0200| [3b0534ea2cd006b38292a28b32a685e6e0ef10a2]

Don't use strcpy() on overlapping memory buffers - fixes #1500

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

 modules/demux/playlist/itml.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/demux/playlist/itml.c b/modules/demux/playlist/itml.c
index c72e3ae..612c0ea 100644
--- a/modules/demux/playlist/itml.c
+++ b/modules/demux/playlist/itml.c
@@ -378,7 +378,7 @@ static vlc_bool_t parse_track_dict COMPLEX_INTERFACE
             !strncmp( psz_uri, "file://localhost/", 17 ) )
         {
             /* remove 'localhost/' */
-            strcpy( psz_uri + 7, psz_uri + 17 );
+            memmove( psz_uri + 7, psz_uri + 17, strlen( psz_uri ) - 9 );
             msg_Info( p_demux, "Adding '%s'", psz_uri );
 
             p_new_input = input_ItemNewExt( p_playlist, psz_uri,




More information about the vlc-devel mailing list