[Mplayer-cvslog] CVS: main/Gui/mplayer/gtk menu.c,1.19,1.20

Zoltan Ponekker pontscho at mplayerhq.hu
Wed Oct 2 16:57:57 CEST 2002


Update of /cvsroot/mplayer/main/Gui/mplayer/gtk
In directory mail:/var/tmp.root/cvs-serv11292/Gui/mplayer/gtk

Modified Files:
	menu.c 
Log Message:
use snprintf instead of sprintf

Index: menu.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/menu.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- menu.c	28 Sep 2002 21:16:12 -0000	1.19
+++ menu.c	2 Oct 2002 14:57:42 -0000	1.20
@@ -309,7 +309,7 @@
       char tmp[32]; int i;
       for ( i=0;i < guiIntfStruct.VCDTracks;i++ )
        {
-        sprintf( tmp,MSGTR_MENU_Title,i+1 );
+        snprintf( tmp,32,MSGTR_MENU_Title,i+1 );
 	AddMenuItem( VCDTitleMenu,tmp,( (i+1) << 16 ) + evSetVCDTrack );
        }
      }
@@ -330,7 +330,7 @@
        char tmp[32]; int i;
        for ( i=0;i < guiIntfStruct.DVD.titles;i++ )
         {
-         sprintf( tmp,MSGTR_MENU_Title,i+1 );
+         snprintf( tmp,32,MSGTR_MENU_Title,i+1 );
          AddMenuItem( DVDTitleMenu,tmp,( (i+1) << 16 ) + evSetDVDTitle );
         }
       }
@@ -345,7 +345,7 @@
        char tmp[32]; int i;
        for ( i=0;i < guiIntfStruct.DVD.chapters;i++ )
         {
-         sprintf( tmp,MSGTR_MENU_Chapter,i+1 );
+         snprintf( tmp,32,MSGTR_MENU_Chapter,i+1 );
          AddMenuItem( DVDChapterMenu,tmp,( (i+1) << 16 ) + evSetDVDChapter );
         }
       }
@@ -378,7 +378,7 @@
        AddMenuItem( DVDSubtitleLanguageMenu,"None",( (unsigned short)-1 << 16 ) + evSetDVDSubtitle );
        for ( i=0;i < guiIntfStruct.DVD.nr_of_subtitles;i++ )
         {
-         strcpy( tmp,GetLanguage( guiIntfStruct.DVD.subtitles[i].language ) );
+	 snprintf( tmp,64,"%s",GetLanguage( guiIntfStruct.DVD.subtitles[i].language ) );
          AddMenuItem( DVDSubtitleLanguageMenu,tmp,( guiIntfStruct.DVD.subtitles[i].id << 16 ) + evSetDVDSubtitle );
         }
       }




More information about the MPlayer-cvslog mailing list