diff options
Diffstat (limited to 'net-im/jabber')
-rw-r--r-- | net-im/jabber/Makefile | 2 | ||||
-rw-r--r-- | net-im/jabber/files/patch-jabberd_lib_xmlnode.cc | 37 | ||||
-rw-r--r-- | net-im/jabber/files/patch-jabberd_log.cc | 32 | ||||
-rw-r--r-- | net-im/jabber/files/patch-jsm_modules_mod__privacy.cc | 11 |
4 files changed, 81 insertions, 1 deletions
diff --git a/net-im/jabber/Makefile b/net-im/jabber/Makefile index fad5f2abb058..b635aa247168 100644 --- a/net-im/jabber/Makefile +++ b/net-im/jabber/Makefile @@ -3,7 +3,7 @@ PORTNAME= jabber PORTVERSION= 1.6.1.1 -PORTREVISION= 19 +PORTREVISION= 20 PORTEPOCH= 1 CATEGORIES= net-im ipv6 MASTER_SITES= http://download.jabberd.org/jabberd14/%SUBDIR%/ diff --git a/net-im/jabber/files/patch-jabberd_lib_xmlnode.cc b/net-im/jabber/files/patch-jabberd_lib_xmlnode.cc new file mode 100644 index 000000000000..e09e74d2e44d --- /dev/null +++ b/net-im/jabber/files/patch-jabberd_lib_xmlnode.cc @@ -0,0 +1,37 @@ +--- jabberd/lib/xmlnode.cc.orig 2007-04-07 19:43:18 UTC ++++ jabberd/lib/xmlnode.cc +@@ -879,9 +879,9 @@ xmlnode xmlnode_get_tag(xmlnode parent, + xmlnode_list_item xmlnode_get_tags(xmlnode context_node, const char *path, xht namespaces, pool p) { + char *this_step = NULL; + const char *ns_iri = NULL; +- char *next_step = NULL; +- char *start_predicate = NULL; +- char *end_predicate = NULL; ++ const char *next_step = NULL; ++ const char *start_predicate = NULL; ++ const char *end_predicate = NULL; + char *predicate = NULL; + char *end_prefix = NULL; + int axis = 0; /* 0 = child, 1 = parent, 2 = attribute */ +@@ -1830,13 +1830,14 @@ xmlnode xmlnode_select_by_lang(xmlnode_l + } + + /* if language has a geographical veriant, get the language as well */ +- if (lang != NULL && strchr(lang, '-') != NULL) { +- snprintf(general_lang, sizeof(general_lang), "%s", lang); +- if (strchr(lang, '-') != NULL) { +- strchr(lang, '-')[0] = 0; +- } else { +- general_lang[0] = 0; +- } ++ if (lang != NULL) { ++#define MIN(a,b) ((a) < (b) ? (a) : (b)) ++ size_t len = sizeof(general_lang); ++ const char *pos; ++ if ((pos = strchr(lang, '-'))) ++ len = MIN(len, pos - lang + 1); ++ ++ snprintf(general_lang, len, "%s", lang); + } + + /* iterate the nodes */ diff --git a/net-im/jabber/files/patch-jabberd_log.cc b/net-im/jabber/files/patch-jabberd_log.cc new file mode 100644 index 000000000000..4a1c37711404 --- /dev/null +++ b/net-im/jabber/files/patch-jabberd_log.cc @@ -0,0 +1,32 @@ +--- jabberd/log.cc.orig 2007-07-20 13:56:59 UTC ++++ jabberd/log.cc +@@ -83,21 +83,22 @@ static char *debug_log_timestamp(void) { + * @return 1 if it should be logged, 0 if not + */ + static inline int _debug_log_zonefilter(char const* zone) { +- char *pos, c = '\0'; ++ const char *pos; ++ char *tmp; ++ int ret = 1; + if(zone != NULL && debug__zones != NULL) + { + pos = strchr(zone,'.'); + if(pos != NULL) + { +- c = *pos; +- *pos = '\0'; /* chop */ ++ tmp = strndup(zone, pos - zone); + } +- if(xhash_get(debug__zones,zone) == NULL) +- return 0; ++ if(xhash_get(debug__zones, (pos ? tmp : zone)) == NULL) ++ ret = 0; + if(pos != NULL) +- *pos = c; /* restore */ ++ free(tmp); + } +- return 1; ++ return ret; + } + + /** diff --git a/net-im/jabber/files/patch-jsm_modules_mod__privacy.cc b/net-im/jabber/files/patch-jsm_modules_mod__privacy.cc new file mode 100644 index 000000000000..5be19d309b0f --- /dev/null +++ b/net-im/jabber/files/patch-jsm_modules_mod__privacy.cc @@ -0,0 +1,11 @@ +--- jsm/modules/mod_privacy.cc.orig 2007-04-07 19:43:18 UTC ++++ jsm/modules/mod_privacy.cc +@@ -1165,7 +1165,7 @@ static mreturn mod_privacy_out_iq_set_li + list_items++; + } + +- if (new_items <= 0) { ++ if (new_items == NULL) { + log_debug2(ZONE, LOGT_EXECFLOW, "This is a deletion request"); + } + |