diff src/audacious/intl/localcharset.c @ 4102:10e7c823462d

Get rid of strcpy() completely.
author Jonathan Schleifer <js-audacious@webkeks.org>
date Fri, 21 Dec 2007 18:39:46 +0100
parents 59452118044d
children 7b9d5718a6dc
line wrap: on
line diff
--- a/src/audacious/intl/localcharset.c	Wed Dec 19 00:57:45 2007 -0600
+++ b/src/audacious/intl/localcharset.c	Fri Dec 21 18:39:46 2007 +0100
@@ -186,8 +186,8 @@
 		  res_size = 0;
 		  break;
 		}
-	      strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
-	      strcpy (res_ptr + res_size - (l2 + 1), buf2);
+	      strncpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1, res_size - (l2 + 1));
+	      strncpy (res_ptr + res_size - (l2 + 1), buf2, res_size - (l1 + 1));
 	    }
 	  fclose (fp);
 	  if (res_size == 0)