changeset 481:bb3698dfd455 trunk

[svn] Tag length enforcement by null-terminating the strings. By Kiyoshi Aman <kiyoshi.aman -at- gmail.com>.
author chainsaw
date Sat, 21 Jan 2006 10:03:15 -0800
parents c1dfb4b13be8
children 0db65eaafe24
files Plugins/Input/console/Audacious_Driver.cpp
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Input/console/Audacious_Driver.cpp	Sat Jan 21 07:12:02 2006 -0800
+++ b/Plugins/Input/console/Audacious_Driver.cpp	Sat Jan 21 10:03:15 2006 -0800
@@ -107,6 +107,10 @@
 		TitleInput *tinput;
 
 		tinput = bmp_title_input_new();
+		
+		header.author[31] = '\0';
+		header.game[31] = '\0';
+		header.song[31] = '\0';
 
 		tinput->performer = g_strdup(header.author);
 		tinput->album_name = g_strdup(header.game);
@@ -140,6 +144,10 @@
 		TitleInput *tinput;
 
 		tinput = bmp_title_input_new();
+		
+		header.author[31] = '\0';
+		header.copyright[31] = '\0';
+		header.game[31] = '\0';
 
 		tinput->performer = g_strdup(header.author);
 		tinput->album_name = g_strdup(header.copyright);
@@ -173,6 +181,10 @@
 		TitleInput *tinput;
 
 		tinput = bmp_title_input_new();
+		
+		header.author[31] = '\0';
+		header.copyright[31] = '\0';
+		header.game[31] = '\0';
 
 		tinput->performer = g_strdup(header.author);
 		tinput->album_name = g_strdup(header.copyright);
@@ -206,6 +218,10 @@
 		TitleInput *tinput;
 
 		tinput = bmp_title_input_new();
+		
+		header.game[31] = '\0';
+		header.copyright[31] = '\0';
+		header.song[31] = '\0';
 
 		tinput->performer = g_strdup(header.game);
 		tinput->album_name = g_strdup(header.copyright);