From 55b6da74d87c15f28048c6441e15dc6a52d5e55b Mon Sep 17 00:00:00 2001 From: Alexander Kass Date: Sat, 7 Sep 2013 11:03:31 +0400 Subject: [PATCH 1/3] len should be signed --- src/conn.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/conn.c b/src/conn.c index 26df418..e35a735 100644 --- a/src/conn.c +++ b/src/conn.c @@ -681,7 +681,8 @@ void xmpp_conn_disable_tls(xmpp_conn_t * const conn) static void _log_open_tag(xmpp_conn_t *conn, char **attrs) { char buf[4096]; - size_t len, pos; + size_t pos; + int len; int i; if (!attrs) return; From badebfa840a3e0044bba9e89aab94b14f47241b7 Mon Sep 17 00:00:00 2001 From: Alexander Kass Date: Sat, 7 Sep 2013 11:04:48 +0400 Subject: [PATCH 2/3] standard memset error size of pointer instead of object --- src/md5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/md5.c b/src/md5.c index c4ac4ac..01231b1 100644 --- a/src/md5.c +++ b/src/md5.c @@ -148,7 +148,7 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx) PUT_32BIT_LSB_FIRST(digest + 4, ctx->buf[1]); PUT_32BIT_LSB_FIRST(digest + 8, ctx->buf[2]); PUT_32BIT_LSB_FIRST(digest + 12, ctx->buf[3]); - memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ + memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ } #ifndef ASM_MD5 From 03b6e90b94fb8fd30dece58dd8aa527b8341aa94 Mon Sep 17 00:00:00 2001 From: Alexander Kass Date: Sat, 7 Sep 2013 11:05:42 +0400 Subject: [PATCH 3/3] warning fix --- src/parser_libxml2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser_libxml2.c b/src/parser_libxml2.c index ab10a4b..1efe4fe 100644 --- a/src/parser_libxml2.c +++ b/src/parser_libxml2.c @@ -46,7 +46,7 @@ static void _set_attributes(xmpp_stanza_t *stanza, const xmlChar **attrs) if (!attrs) return; for (i = 0; attrs[i]; i += 2) { - xmpp_stanza_set_attribute(stanza, attrs[i], attrs[i+1]); + xmpp_stanza_set_attribute(stanza, (const char *)attrs[i], (const char *)attrs[i+1]); } }