# HG changeset patch # User pontscho # Date 1033570662 0 # Node ID b86106f3b27211195d6842a6f18456e13b9c00de # Parent 4a233f3b09a70979d2daf5dad1a694e39ea0dd95 use snprintf instead of sprintf diff -r 4a233f3b09a7 -r b86106f3b272 Gui/mplayer/gtk/menu.c --- a/Gui/mplayer/gtk/menu.c Wed Oct 02 13:16:15 2002 +0000 +++ b/Gui/mplayer/gtk/menu.c Wed Oct 02 14:57:42 2002 +0000 @@ -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 ); } }