changeset 1736:35f8a5fbd1b6

Automated merge with ssh://hg.atheme.org//hg/audacious-plugins
author William Pitcock <nenolod@atheme.org>
date Tue, 18 Sep 2007 19:39:41 -0500
parents f0b53c4db5ba (diff) 5e47a0c1b969 (current diff)
children b729c7a72c20 3572d3444a7c 29d0e4435e0e
files
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/neon/neon.c	Wed Sep 19 02:25:05 2007 +0200
+++ b/src/neon/neon.c	Tue Sep 18 19:39:41 2007 -0500
@@ -160,13 +160,15 @@
  * -----
  */
 
+#define TAGSIZE 4096
+
 static void parse_icy(struct icy_metadata* m, gchar* metadata, int len) {
 
     gchar* p;
     gchar* tstart;
     gchar* tend;
-    gchar name[4096];
-    gchar value[4096];
+    gchar name[TAGSIZE];
+    gchar value[TAGSIZE];
     int state;
     int pos;
 
@@ -190,7 +192,7 @@
                      * End of tag name.
                      */
                     *p = '\0';
-                    strcpy(name, tstart);
+                    g_strlcpy(name, tstart, TAGSIZE);
                     _DEBUG("Found tag name: %s", name);
                     state = 2;
                 } else {
@@ -219,7 +221,7 @@
                      * End of value
                      */
                     *p = '\0';
-                    strcpy(value, tstart);
+                    g_strlcpy(value, tstart, TAGSIZE);
                     _DEBUG("Found tag value: %s", value);
                     add_icy(m, name, value);
                     state = 4;