[MPlayer-cvslog] r32487 - in trunk: gui/mplayer/gtk/gtk_menu.c stream/librtsp/rtsp_rtp.c

reimar subversion at mplayerhq.hu
Wed Oct 13 20:56:44 CEST 2010


Author: reimar
Date: Wed Oct 13 20:56:44 2010
New Revision: 32487

Log:
Replace snprintf by av_strlcpy.
Patch by Frédéric Marchal [fmarchal perso be].

Modified:
   trunk/gui/mplayer/gtk/gtk_menu.c
   trunk/stream/librtsp/rtsp_rtp.c

Modified: trunk/gui/mplayer/gtk/gtk_menu.c
==============================================================================
--- trunk/gui/mplayer/gtk/gtk_menu.c	Wed Oct 13 20:38:50 2010	(r32486)
+++ trunk/gui/mplayer/gtk/gtk_menu.c	Wed Oct 13 20:56:44 2010	(r32487)
@@ -533,7 +533,7 @@ GtkWidget * create_PopUpMenu( void )
        AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_MENU_None,( (unsigned short)-1 << 16 ) + evSetDVDSubtitle );
        for ( i=0;i < guiIntfStruct.DVD.nr_of_subtitles;i++ )
         {
-	 snprintf( tmp,64,"%s",GetLanguage( guiIntfStruct.DVD.subtitles[i].language ) );
+         av_strlcpy( tmp,GetLanguage( guiIntfStruct.DVD.subtitles[i].language ),sizeof(tmp) );
          AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,tmp,
 			   dvdsub_id == guiIntfStruct.DVD.subtitles[i].id,
 			   ( guiIntfStruct.DVD.subtitles[i].id << 16 ) + evSetDVDSubtitle );

Modified: trunk/stream/librtsp/rtsp_rtp.c
==============================================================================
--- trunk/stream/librtsp/rtsp_rtp.c	Wed Oct 13 20:38:50 2010	(r32486)
+++ trunk/stream/librtsp/rtsp_rtp.c	Wed Oct 13 20:56:44 2010	(r32487)
@@ -218,7 +218,7 @@ parse_destination (const char *line)
   len = strlen (parse1) - strlen (parse2)
     - strlen (RTSP_SETUP_DESTINATION) + 1;
   dest = (char *) malloc (len + 1);
-  snprintf (dest, len, parse1 + strlen (RTSP_SETUP_DESTINATION));
+  av_strlcpy (dest, parse1 + strlen (RTSP_SETUP_DESTINATION), len);
   free (line_copy);
 
   return dest;


More information about the MPlayer-cvslog mailing list