--- a/libpurple/protocols/gg/lib/common.c Fri Mar 21 04:40:05 2014 -0500
+++ b/libpurple/protocols/gg/lib/common.c Sat Mar 22 00:42:07 2014 +0100
@@ -27,9 +27,7 @@
@@ -253,10 +251,12 @@
struct in_addr *a = addr;
struct sockaddr_in myaddr;
- gg_debug(GG_DEBUG_FUNCTION, "** gg_connect(%s, %d, %d);\n", inet_ntoa(*a), port, async);
+ gg_debug(GG_DEBUG_FUNCTION, "** gg_connect(%s, %d, %d);\n", + inet_ntoa(*a), port, async); if ((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) {
- gg_debug(GG_DEBUG_MISC, "// gg_connect() socket() failed (errno=%d, %s)\n", errno, strerror(errno));
+ gg_debug(GG_DEBUG_MISC, "// gg_connect() socket() failed " + "(errno=%d, %s)\n", errno, strerror(errno)); @@ -266,7 +266,8 @@
myaddr.sin_addr.s_addr = gg_local_ip;
if (bind(sock, (struct sockaddr *) &myaddr, sizeof(myaddr)) == -1) {
- gg_debug(GG_DEBUG_MISC, "// gg_connect() bind() failed (errno=%d, %s)\n", errno, strerror(errno));
+ gg_debug(GG_DEBUG_MISC, "// gg_connect() bind() failed " + "(errno=%d, %s)\n", errno, strerror(errno)); @@ -300,7 +301,8 @@
- gg_debug(GG_DEBUG_MISC, "// gg_connect() connect() in progress\n");
+ gg_debug(GG_DEBUG_MISC, + "// gg_connect() connect() in progress\n"); @@ -575,19 +577,23 @@
if (!gg_proxy_enabled || !gg_proxy_username || !gg_proxy_password)
- if (!(tmp = malloc((tmp_size = strlen(gg_proxy_username) + strlen(gg_proxy_password) + 2))))
+ tmp_size = strlen(gg_proxy_username) + strlen(gg_proxy_password) + 2; + tmp = malloc(tmp_size); snprintf(tmp, tmp_size, "%s:%s", gg_proxy_username, gg_proxy_password);
- if (!(enc = gg_base64_encode(tmp))) {
+ enc = gg_base64_encode(tmp); - if (!(out = malloc(strlen(enc) + 40))) {
+ out = malloc(strlen(enc) + 40); --- a/libpurple/protocols/gg/lib/dcc7.c Fri Mar 21 04:40:05 2014 -0500
+++ b/libpurple/protocols/gg/lib/dcc7.c Sat Mar 22 00:42:07 2014 +0100
@@ -664,7 +664,10 @@
/* Uwaga: To nie jest ciąg kończony zerem.
* Note: This is not a null-terminated string. */
- strncpy((char*) s.filename, (char*) tmp->filename, sizeof(s.filename));
+ sizeof(s.filename) == sizeof(tmp->filename) - 1, + filename_sizes_does_not_match); + memcpy((char*)s.filename, (char*)tmp->filename, sizeof(s.filename)); tmp->state = GG_STATE_WAITING_FOR_ACCEPT;
tmp->timeout = GG_DCC7_TIMEOUT_FILE_ACK;
--- a/libpurple/protocols/gg/lib/events.c Fri Mar 21 04:40:05 2014 -0500
+++ b/libpurple/protocols/gg/lib/events.c Sat Mar 22 00:42:07 2014 +0100
@@ -1239,7 +1239,9 @@
struct gg_event *e, enum gg_state_t next_state,
enum gg_state_t alt_state, enum gg_state_t alt2_state)
+#if defined(GG_CONFIG_HAVE_GNUTLS) || defined(GG_CONFIG_HAVE_OPENSSL) #ifdef GG_CONFIG_HAVE_GNUTLS
@@ -1436,6 +1438,7 @@
+#if defined(GG_CONFIG_HAVE_GNUTLS) || defined(GG_CONFIG_HAVE_OPENSSL) gg_debug_session(sess, GG_DEBUG_MISC, "// WARNING! unable to verify hostname\n");
@@ -1450,6 +1453,7 @@
sess->timeout = GG_DEFAULT_TIMEOUT;
static gg_action_t gg_handle_reading_proxy_gg(struct gg_session *sess,
--- a/libpurple/protocols/gg/lib/handlers.c Fri Mar 21 04:40:05 2014 -0500
+++ b/libpurple/protocols/gg/lib/handlers.c Sat Mar 22 00:42:07 2014 +0100
@@ -27,10 +27,8 @@
--- a/libpurple/protocols/gg/lib/internal.h Fri Mar 21 04:40:05 2014 -0500
+++ b/libpurple/protocols/gg/lib/internal.h Sat Mar 22 00:42:07 2014 +0100
@@ -55,6 +55,10 @@
+#define GG_STATIC_ASSERT(condition, message) \ + { typedef char static_assertion_failed_ ## message \ + [(condition) ? 1 : -1]; } --- a/libpurple/protocols/gg/lib/protobuf-c.c Fri Mar 21 04:40:05 2014 -0500
+++ b/libpurple/protocols/gg/lib/protobuf-c.c Sat Mar 22 00:42:07 2014 +0100
@@ -1363,7 +1363,6 @@
buffer->append (buffer, rv, array);
@@ -2028,7 +2027,6 @@
-goto no_unpacking_needed;
memcpy (array, at, count * siz);
--- a/libpurple/protocols/gg/lib/resolver.c Fri Mar 21 04:40:05 2014 -0500
+++ b/libpurple/protocols/gg/lib/resolver.c Sat Mar 22 00:42:07 2014 +0100
@@ -474,7 +474,8 @@
kill(data->pid, SIGKILL);
- waitpid(data->pid, NULL, WNOHANG);
+ /* we don't care about child's exit status, just want to clean it up */ + (void)waitpid(data->pid, NULL, WNOHANG); @@ -817,10 +818,10 @@
+#ifdef GG_CONFIG_HAVE_PTHREAD + type = GG_RESOLVER_PTHREAD; type = GG_RESOLVER_WIN32;
-#elif defined(GG_CONFIG_HAVE_PTHREAD) && defined(GG_CONFIG_PTHREAD_DEFAULT)
- type = GG_RESOLVER_PTHREAD;
#elif defined(GG_CONFIG_HAVE_FORK)
@@ -944,10 +945,10 @@
+#ifdef GG_CONFIG_HAVE_PTHREAD + type = GG_RESOLVER_PTHREAD; type = GG_RESOLVER_WIN32;
-#elif defined(GG_CONFIG_HAVE_PTHREAD) && defined(GG_CONFIG_PTHREAD_DEFAULT)
- type = GG_RESOLVER_PTHREAD;
#elif defined(GG_CONFIG_HAVE_FORK)