comparison libpurple/protocols/zephyr/zephyr.c @ 32228:5d442ea707b5

Replace numerous strcpy() invocations with strlcpy() in Zephyr. Thanks to the Electronic Frontier Foundation (http://www.eff.org/) for this patch.
author Ethan Blanton <elb@pidgin.im>
date Sun, 17 Jul 2011 03:57:21 +0000
parents 7c33eaed54e5
children c80ac2d937b7
comparison
equal deleted inserted replaced
32227:aeff9586f987 32228:5d442ea707b5
2233 if (strlen(tmp) >= sizeof(buf)) { 2233 if (strlen(tmp) >= sizeof(buf)) {
2234 g_free(tmp); 2234 g_free(tmp);
2235 return NULL; 2235 return NULL;
2236 } 2236 }
2237 2237
2238 strcpy(buf, tmp); 2238 g_strlcpy(buf, tmp, sizeof(buf));
2239 g_free(tmp); 2239 g_free(tmp);
2240 2240
2241 return buf; 2241 return buf;
2242 } 2242 }
2243 2243