SOURCES: stream_cddb_fix_20080120.diff (NEW) - from http://www.mpl...

glen glen at pld-linux.org
Thu Jan 31 15:23:53 CET 2008


Author: glen                         Date: Thu Jan 31 14:23:53 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- from http://www.mplayerhq.hu/MPlayer/patches/stream_cddb_fix_20080120.diff

---- Files affected:
SOURCES:
   stream_cddb_fix_20080120.diff (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/stream_cddb_fix_20080120.diff
diff -u /dev/null SOURCES/stream_cddb_fix_20080120.diff:1.1
--- /dev/null	Thu Jan 31 15:23:53 2008
+++ SOURCES/stream_cddb_fix_20080120.diff	Thu Jan 31 15:23:48 2008
@@ -0,0 +1,34 @@
+Index: stream_cddb.c
+===================================================================
+--- stream_cddb.c	(revision 24724)
++++ 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);
================================================================


More information about the pld-cvs-commit mailing list