changeset 31785: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 de1a7814023f
children a48d58e0512b
files libpurple/stun.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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);