summaryrefslogtreecommitdiff
path: root/media-sound/modplugtools/files
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2010-08-02 20:50:31 +0100
committerNick White <git@njw.me.uk>2010-08-02 20:50:31 +0100
commitcfeaa63fc50335db2daab2bcdfaf38a642e5a60c (patch)
treee8089e1227ff97d6d835c2e0451ef22a48888700 /media-sound/modplugtools/files
parent5f5930586a2d0587a7099b64a37c69c98dd5c2bd (diff)
downloadnjw-gentoo-local-cfeaa63fc50335db2daab2bcdfaf38a642e5a60c.tar.bz2
njw-gentoo-local-cfeaa63fc50335db2daab2bcdfaf38a642e5a60c.zip
Add overflow fix patch to modplugtools
Diffstat (limited to 'media-sound/modplugtools/files')
-rw-r--r--media-sound/modplugtools/files/modplug-nooverflow.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/media-sound/modplugtools/files/modplug-nooverflow.patch b/media-sound/modplugtools/files/modplug-nooverflow.patch
new file mode 100644
index 0000000..2f7d504
--- /dev/null
+++ b/media-sound/modplugtools/files/modplug-nooverflow.patch
@@ -0,0 +1,26 @@
+--- mp123/modplug123.c 2010-04-11 08:29:58.000000000 +0100
++++ mp123/modplug123.c 2010-08-02 20:30:52.739025706 +0100
+@@ -354,8 +354,8 @@ for (song=1; song<argc; song++) {
+
+
+ set_keypress();
+- strcpy(songname, ModPlug_GetName(f2));
+- if (strlen(songname)==0) strcpy(songname,argv[song]);
++ strncpy(songname, ModPlug_GetName(f2), 41);
++ if (strlen(songname)==0) strncpy(songname,argv[song], 41);
+ sprintf(status,"playing %s (%%d.%%d/%d\") (%%d/%%d/%%d%%s) \b\b\b\b",songname,ModPlug_GetLength(f2)/1000,format.rate,format.channels,settings.mBits,order);
+ if (loop) sprintf(status,"looping %s (%%d.%%d/%d\") (%%d/%%d/%%d%%s) \b\b\b\b",songname,ModPlug_GetLength(f2)/1000,format.rate,format.channels,settings.mBits,order);
+
+--- mpplay/modplugplay.c 2010-04-11 09:12:50.000000000 +0100
++++ mpplay/modplugplay.c 2010-08-02 20:30:41.298200678 +0100
+@@ -441,8 +441,8 @@ for (song=1; song<argc; song++) {
+ // [rev--dly--] [sur--dly--] [bas--rng--]
+
+ set_keypress();
+- strcpy(songname, ModPlug_GetName(f2));
+- if (strlen(songname)==0) strcpy(songname,argv[song]);
++ strncpy(songname, ModPlug_GetName(f2), 41);
++ if (strlen(songname)==0) strncpy(songname,argv[song], 41);
+ sprintf(status,"playing %s (%%d.%%d/%d\") (%%d/%%d/%%d%%s) \b\b\b\b",songname,ModPlug_GetLength(f2)/1000,speed,channels,settings.mBits,order);
+ if (loop) sprintf(status,"looping %s (%%d.%%d/%d\") (%%d/%%d/%%d%%s) \b\b\b\b",songname,ModPlug_GetLength(f2)/1000,speed,channels,settings.mBits,order);
+