summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/mplayer/stream_cddb_fix_20080120.diff
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2008-10-28 21:09:28 (GMT)
committerJames Meyer <james.meyer@operamail.com>2008-10-28 21:09:28 (GMT)
commitc848d1b444b9e03f047830c04f5e1e70183035e9 (patch)
treeff2e83339e0a73ad89a29c4f339045fb7c054952 /abs/extra-testing/mplayer/stream_cddb_fix_20080120.diff
parentc1381a8b3a355c57fca1ce2bfad0e3bf3e32b4ba (diff)
downloadlinhes_pkgbuild-c848d1b444b9e03f047830c04f5e1e70183035e9.zip
linhes_pkgbuild-c848d1b444b9e03f047830c04f5e1e70183035e9.tar.gz
linhes_pkgbuild-c848d1b444b9e03f047830c04f5e1e70183035e9.tar.bz2
move mplayer to testing
Diffstat (limited to 'abs/extra-testing/mplayer/stream_cddb_fix_20080120.diff')
-rw-r--r--abs/extra-testing/mplayer/stream_cddb_fix_20080120.diff32
1 files changed, 32 insertions, 0 deletions
diff --git a/abs/extra-testing/mplayer/stream_cddb_fix_20080120.diff b/abs/extra-testing/mplayer/stream_cddb_fix_20080120.diff
new file mode 100644
index 0000000..45f7226
--- /dev/null
+++ b/abs/extra-testing/mplayer/stream_cddb_fix_20080120.diff
@@ -0,0 +1,32 @@
+--- stream/stream_cddb.c (revision 24724)
++++ stream/stream_cddb.c (working copy)
+@@ -53,6 +53,7 @@
+ #include "version.h"
+ #include "stream.h"
+ #include "network.h"
++#include "libavutil/intreadwrite.h"
+
+ #define DEFAULT_FREEDB_SERVER "freedb.freedb.org"
+ #define DEFAULT_CACHE_DIR "/.cddb/"
+@@ -453,8 +454,9 @@
+ } else {
+ len = ptr2-ptr+1;
+ }
++ len = FFMIN(sizeof(album_title) - 1, len);
+ strncpy(album_title, ptr, len);
+- album_title[len-2]='\0';
++ album_title[len]='\0';
+ }
+ mp_msg(MSGT_DEMUX, MSGL_STATUS, MSGTR_MPDEMUX_CDDB_ParseOKFoundAlbumTitle, album_title);
+ return 0;
+@@ -490,8 +492,9 @@
+ } else {
+ len = ptr2-ptr+1;
+ }
++ len = FFMIN(sizeof(album_title) - 1, len);
+ strncpy(album_title, ptr, len);
+- album_title[len-2]='\0';
++ album_title[len]='\0';
+ }
+ mp_msg(MSGT_DEMUX, MSGL_STATUS, MSGTR_MPDEMUX_CDDB_ParseOKFoundAlbumTitle, album_title);
+ return cddb_request_titles(cddb_data);