diff libpurple/stun.c @ 32243:0d94c49f9545

Almost certainly not an issue, but bounds check a strcpy in stun.c (EFF)
author Ethan Blanton <elb@pidgin.im>
date Thu, 11 Aug 2011 16:13:15 +0000
parents b671728e6ee9
children f22bc8b5b9dc
line wrap: on
line diff
--- a/libpurple/stun.c	Thu Aug 11 16:10:33 2011 +0000
+++ b/libpurple/stun.c	Thu Aug 11 16:13:15 2011 +0000
@@ -226,7 +226,7 @@
 				memcpy(&in.s_addr, tmp + 4, 4);
 				ip = inet_ntoa(in);
 				if(ip)
-					strcpy(nattype.publicip, ip);
+					g_strlcpy(nattype.publicip, ip, sizeof(nattype.publicip));
 			}
 
 			tmp += ntohs(attrib->len);