pidgin: 35387f98: Copy hostname fallbacks using g_strlcpy ...
elb at pidgin.im
elb at pidgin.im
Thu Aug 11 10:51:30 EDT 2011
----------------------------------------------------------------------
Revision: 35387f98f5934f8ae5ca7059381caae9d8b8c401
Parent: 7ca32691e054b9274c7e0d3105eb83aaa91ba75f
Author: elb at pidgin.im
Date: 07/17/11 17:04:52
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/35387f98f5934f8ae5ca7059381caae9d8b8c401
Changelog:
Copy hostname fallbacks using g_strlcpy instead of strcpy.
Thanks to the Electronic Frontier Foundation (https://www.eff.org/) for
this patch.
Changes against parent 7ca32691e054b9274c7e0d3105eb83aaa91ba75f
patched libpurple/proxy.c
-------------- next part --------------
============================================================
--- libpurple/proxy.c 256cb2c281bdb65dc52b4d27531fce96d16d1603
+++ libpurple/proxy.c 7ca2ad373cd9aa3180f4011790775334b2971251
@@ -981,7 +981,7 @@ http_canread(gpointer data, gint source,
hostname[sizeof(hostname) - 1] = '\0';
if (ret < 0 || hostname[0] == '\0') {
purple_debug_warning("proxy", "gethostname() failed -- is your hostname set?");
- strcpy(hostname, "localhost");
+ g_strlcpy(hostname, "localhost", sizeof(hostname));
}
if (domain != NULL)
@@ -1115,7 +1115,7 @@ http_start_connect_tunneling(PurpleProxy
hostname[sizeof(hostname) - 1] = '\0';
if (ret < 0 || hostname[0] == '\0') {
purple_debug_warning("proxy", "gethostname() failed -- is your hostname set?");
- strcpy(hostname, "localhost");
+ g_strlcpy(hostname, "localhost", sizeof(hostname));
}
t1 = g_strdup_printf("%s:%s",
More information about the Commits
mailing list