diff options
author | dholland <dholland> | 2012-07-14 22:12:42 +0000 |
---|---|---|
committer | dholland <dholland> | 2012-07-14 22:12:42 +0000 |
commit | 2235f021db62675cf8620728d7011cefb14b4ba9 (patch) | |
tree | 64ef2ac8dc8e04fc079a8971c3c4d0561108bd33 | |
parent | fb7161aaf67dc1ff4576ee29df44d3bd8a18e9c1 (diff) | |
download | pkgsrc-2235f021db62675cf8620728d7011cefb14b4ba9.tar.gz |
Remove chat/centericq as promised. This has not been buildable for
years due to C++ standards drift and has been superseded by centerim.
35 files changed, 0 insertions, 1478 deletions
diff --git a/chat/centericq/DESCR b/chat/centericq/DESCR deleted file mode 100644 index 53b9c11a83e..00000000000 --- a/chat/centericq/DESCR +++ /dev/null @@ -1,8 +0,0 @@ -Text mode menu- and window-driven IM interface that supports the -ICQ2000, Yahoo!, AIM, IRC, MSN, Gadu-Gadu and Jabber protocols. It -allows you to send, receive, and forward messages, URLs, SMSes -(both through the ICQ server and e-mail gateways supported by -Mirabilis), contacts, and email express messages. It also lets you -set your own and fetch others' away messages, and define external -handlers for incoming events. Apart from IM it supports LiveJournal -management and receiving RSS feeds. diff --git a/chat/centericq/Makefile b/chat/centericq/Makefile deleted file mode 100644 index 7cdb205cd46..00000000000 --- a/chat/centericq/Makefile +++ /dev/null @@ -1,75 +0,0 @@ -# $NetBSD: Makefile,v 1.76 2012/04/07 17:31:12 dholland Exp $ -# - -DISTNAME= centericq-4.21.0 -PKGREVISION= 8 -CATEGORIES= chat -MASTER_SITES= http://thekonst.net/download/ -EXTRACT_SUFX= .tar.bz2 - -MAINTAINER= pkgsrc-users@NetBSD.org -HOMEPAGE= http://thekonst.net/eng/software/centericq/info.html -COMMENT= Instant Messenger interface supporting many protocols - -CONFLICTS= centerim<4.22.5 - -USE_PKGLOCALEDIR= yes -USE_TOOLS+= gmake perl:run -USE_LANGUAGES= c c++ - -GNU_CONFIGURE= yes -CONFIGURE_ARGS+= --with-ssl --with-openssl=${SSLBASE:Q} -LIBS+= ${LDFLAGS} - -REPLACE_PERL= misc/cicqconv - -INCOMPAT_CURSES+= NetBSD-1.[45]*-* NetBSD-1.6-* NetBSD-1.6.[1-9]-* -INCOMPAT_CURSES+= NetBSD-1.6_*-* NetBSD-1.6.[1-9]_*-* NetBSD-1.6[A-T]-* -INCOMPAT_CURSES+= NetBSD-2.*-* NetBSD-3.*-* # see PR 29060 -INCOMPAT_CURSES+= NetBSD-4.*-* - -BROKEN= Not compilable due to C++ language drift, and dead upstream. - -NOT_FOR_PLATFORM+= DragonFly-2.1[0-9]-* DragonFly-[3-9].*-* - -PKG_DESTDIR_SUPPORT= user-destdir - -.include "options.mk" -.include "../../mk/bsd.prefs.mk" - -.if ${OPSYS} == "NetBSD" -CPPFLAGS+= -DAUDIO_PLAYER="\"/usr/bin/audioplay\"" -.else -DEPENDS+= sox>=12.17.4:../../audio/sox -EVAL_PREFIX+= SOX_PREFIX=sox -CPPFLAGS+= -DAUDIO_PLAYER="\"${SOX_PREFIX}/bin/play\"" -.endif - -.if !empty(MACHINE_ARCH:Msparc64) -GCC_REQD+= 3.0 # see PR 29185 -.endif - -.include "../../converters/libiconv/buildlink3.mk" -.include "../../devel/gettext-lib/buildlink3.mk" -.include "../../devel/ncurses/buildlink3.mk" -.include "../../security/openssl/buildlink3.mk" -.include "../../www/curl/buildlink3.mk" - -.if defined(BUILDLINK_LIBICONV_LDADD) && !empty(BUILDLINK_LIBICONV_LDADD) -# -# libiconv depends on configure scripts to include <iconv.h> before -# trying to link against -liconv. Unfortunately, centericq's script -# doesn't do this, so fake it. -# -CONFIGURE_ENV+= ac_cv_lib_iconv_iconv=yes -.endif - -post-install: - ${INSTALL_MAN} ${WRKSRC}/centericq.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ - -.include "../../mk/bsd.pkg.mk" - -.if ${MACHINE_ARCH} == "alpha" -# avoid toolchain bugs -CFLAGS:= ${CFLAGS:C/-O[0-9]*//g} -.endif diff --git a/chat/centericq/PLIST b/chat/centericq/PLIST deleted file mode 100644 index 45757eaead4..00000000000 --- a/chat/centericq/PLIST +++ /dev/null @@ -1,29 +0,0 @@ -@comment $NetBSD: PLIST,v 1.9 2009/06/14 17:37:43 joerg Exp $ -bin/centericq -bin/cicqconv -bin/cicqsync -man/man1/centericq.1 -man/man1/cicqconv.1 -man/man1/cicqsync.1 -share/centericq/email.wav -share/centericq/msg.wav -share/centericq/offline.wav -share/centericq/online.wav -share/centericq/sms.wav -share/centericq/url.wav -share/locale/bg/LC_MESSAGES/centericq.mo -share/locale/cs/LC_MESSAGES/centericq.mo -share/locale/de/LC_MESSAGES/centericq.mo -share/locale/es/LC_MESSAGES/centericq.mo -share/locale/fr/LC_MESSAGES/centericq.mo -share/locale/hu/LC_MESSAGES/centericq.mo -share/locale/it/LC_MESSAGES/centericq.mo -share/locale/ms/LC_MESSAGES/centericq.mo -share/locale/nl/LC_MESSAGES/centericq.mo -share/locale/pl/LC_MESSAGES/centericq.mo -share/locale/pt_BR/LC_MESSAGES/centericq.mo -share/locale/ro/LC_MESSAGES/centericq.mo -share/locale/ru/LC_MESSAGES/centericq.mo -share/locale/sv/LC_MESSAGES/centericq.mo -share/locale/uk/LC_MESSAGES/centericq.mo -share/locale/zh_TW.Big5/LC_MESSAGES/centericq.mo diff --git a/chat/centericq/distinfo b/chat/centericq/distinfo deleted file mode 100644 index ffd29787445..00000000000 --- a/chat/centericq/distinfo +++ /dev/null @@ -1,35 +0,0 @@ -$NetBSD: distinfo,v 1.24 2008/08/02 20:26:21 dholland Exp $ - -SHA1 (centericq-4.21.0.tar.bz2) = 26b07c4bdcbe8c6888ceab98140b33007bec8554 -RMD160 (centericq-4.21.0.tar.bz2) = 69207fcaf5c90b9ae4609221526b839659c5ccfc -Size (centericq-4.21.0.tar.bz2) = 1422126 bytes -SHA1 (patch-aa) = 244ccb35ceb53715af2134d27ab4c591ed62dd30 -SHA1 (patch-ab) = 6d9beb28024666bbfef2e95cab648d7058f8136c -SHA1 (patch-ac) = 74ae25e19bf5d250a407a937bf78405b38cc86da -SHA1 (patch-ad) = be8ba5c952bf560b0758c97ba81c4faef04ffe49 -SHA1 (patch-ae) = f8e9317634f0c5d838f0309c1a59dcb2f3e55d86 -SHA1 (patch-af) = 5104572b93c4bc1872340ac4d179d74f74958fe8 -SHA1 (patch-ag) = c63b3e1011205f7635ca1710a6e5b39f7ef8986c -SHA1 (patch-ah) = 2e643c6cfd5812f5f35a08e29cfa858902e1760b -SHA1 (patch-ai) = 2ac32940347733dbb63e12bdd54212435795b30d -SHA1 (patch-aj) = 1e4ea16dfc5c8eeae9b70b4bda01a2b367ea2879 -SHA1 (patch-ak) = 155067c43db79d398465bac2d70878e8b714fa8b -SHA1 (patch-al) = 8866a5601d8242f5b309e1917abd388b47b48af0 -SHA1 (patch-am) = 5011cd97a05f332c430371382a2b27742bd0e2da -SHA1 (patch-an) = 2fa7bea74bdd6d6aa36f071359459a549dff530a -SHA1 (patch-ao) = 2b53f7e406046d504280b564e19e919ddd02fb9c -SHA1 (patch-ap) = 3092f56b292a3fe57cb80ad7a9fe26d8c6842840 -SHA1 (patch-aq) = ce0db172171d874cd35c4b0293ea96f5a580810e -SHA1 (patch-ar) = b06ba8fad9a2dbcfacb0c81e2689cca02a38dd01 -SHA1 (patch-as) = 55822a88a4fd17e57a06f0f186a6649fe3e4b092 -SHA1 (patch-at) = 7dd7158371940522c7d393ea8d9194c2e4154cf8 -SHA1 (patch-au) = 3a1bab4ffc13cc75480a6d249185a07e52bcdf6d -SHA1 (patch-av) = bf032d4447349d3b4f75c43f58eca3e0342b9f9d -SHA1 (patch-aw) = 20b682ce67e9d026a1253e2ce7546eea1d924282 -SHA1 (patch-ax) = a96edcc859b30fde6e6577a833005fab8d45eabf -SHA1 (patch-ay) = 46ca8c7a9828c471aa760089f2271f21c9cf0ce6 -SHA1 (patch-az) = 4542871c64fffb311cc464bc0b25fb59ef2db3b3 -SHA1 (patch-ba) = 5535fde395fe6e77e8e8ed5f81e38e0db302c09d -SHA1 (patch-bb) = b47e899ba23e06817afffe42d51a52025ebded13 -SHA1 (patch-bc) = 2aecc91589d53bd9a5a4331a4702b6485788f674 -SHA1 (patch-bd) = abb61646b41fed2d6bfcf28f1de0f0466569607e diff --git a/chat/centericq/options.mk b/chat/centericq/options.mk deleted file mode 100644 index bb193765445..00000000000 --- a/chat/centericq/options.mk +++ /dev/null @@ -1,15 +0,0 @@ -# $NetBSD: options.mk,v 1.2 2007/04/15 20:16:42 wiz Exp $ -# - -PKG_OPTIONS_VAR= PKG_OPTIONS.centericq -PKG_SUPPORTED_OPTIONS= gpgme -PKG_SUGGESTED_OPTIONS= gpgme - -.include "../../mk/bsd.options.mk" - -.if !empty(PKG_OPTIONS:Mgpgme) -CONFIGURE_ARGS+= --with-gpgme=${BUILDLINK_PREFIX.gpgme} -. include "../../security/gpgme/buildlink3.mk" -.else -CONFIGURE_ARGS+= --without-gpgme -.endif diff --git a/chat/centericq/patches/patch-aa b/chat/centericq/patches/patch-aa deleted file mode 100644 index 8a563ee5707..00000000000 --- a/chat/centericq/patches/patch-aa +++ /dev/null @@ -1,47 +0,0 @@ -$NetBSD: patch-aa,v 1.5 2006/10/01 13:56:01 rillig Exp $ - ---- src/icqconf.cc.orig 2005-01-27 00:52:47.000000000 +0100 -+++ src/icqconf.cc -@@ -27,7 +27,11 @@ - #include <dirent.h> - #include <fstream> - --#ifdef __sun__ -+#ifdef __NetBSD__ -+/* Find out about __NetBSD_Version__ */ -+# include <sys/param.h> -+#endif -+#if defined(__sun) || (defined(__NetBSD__) && (__NetBSD_Version__ >= 299000900)) - #include <sys/statvfs.h> - #endif - -@@ -644,13 +648,13 @@ void icqconf::loadsounds() { - - switch(rs) { - case rscard: -- fo << "*\tmsg\tplay " << SHARE_DIR << "/msg.wav" << endl; -- fo << "*\turl\tplay " << SHARE_DIR << "/url.wav" << endl; -- fo << "*\temail\tplay " << SHARE_DIR << "/email.wav" << endl; -- fo << "*\tonline\tplay " << SHARE_DIR << "/online.wav" << endl; -- fo << "*\toffline\tplay " << SHARE_DIR << "/offline.wav" << endl; -- fo << "*\tsms\tplay " << SHARE_DIR << "/sms.wav" << endl; -- break; -+ fo << "*\tmsg\t" AUDIO_PLAYER " " << SHARE_DIR << "/msg.wav" << endl; -+ fo << "*\turl\t" AUDIO_PLAYER " " << SHARE_DIR << "/url.wav" << endl; -+ fo << "*\temail\t" AUDIO_PLAYER " " << SHARE_DIR << "/email.wav" << endl; -+ fo << "*\tonline\t" AUDIO_PLAYER " " << SHARE_DIR << "/online.wav" << endl; -+ fo << "*\toffline\t" AUDIO_PLAYER << SHARE_DIR << "/offline.wav" << endl; -+ fo << "*\tsms\t" AUDIO_PLAYER " " << SHARE_DIR << "/sms.wav" << endl; -+ break; - - case rsspeaker: - fo << "*\tmsg\t!spk1" << endl; -@@ -1433,7 +1437,7 @@ string icqconf::gethttpproxypasswd() con - void icqconf::checkdiskspace() { - fenoughdiskspace = true; - --#ifndef __sun__ -+#if !(defined(__sun) || (defined(__NetBSD__) && (__NetBSD_Version__ >= 299000900))) - struct statfs st; - if(!statfs(conf.getdirname().c_str(), &st)) { - #else diff --git a/chat/centericq/patches/patch-ab b/chat/centericq/patches/patch-ab deleted file mode 100644 index 47bd475e8f0..00000000000 --- a/chat/centericq/patches/patch-ab +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-ab,v 1.1 2004/08/01 17:19:04 kristerw Exp $ - ---- libmsn-0.1/msn/filetransfer.cpp.orig Sun Aug 1 18:33:02 2004 -+++ libmsn-0.1/msn/filetransfer.cpp Sun Aug 1 18:35:26 2004 -@@ -26,6 +26,7 @@ - #include <msn/externals.h> - - #ifndef WIN32 -+#include <sys/time.h> - #include <unistd.h> - #include <sys/socket.h> - #else diff --git a/chat/centericq/patches/patch-ac b/chat/centericq/patches/patch-ac deleted file mode 100644 index ca91b2f1cdb..00000000000 --- a/chat/centericq/patches/patch-ac +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-ac,v 1.1 2004/08/01 17:19:04 kristerw Exp $ - ---- libmsn-0.1/msn/util.cpp.orig Sun Aug 1 18:49:51 2004 -+++ libmsn-0.1/msn/util.cpp Sun Aug 1 18:50:59 2004 -@@ -24,6 +24,9 @@ - #include <cerrno> - #include <cctype> - -+// Get rid of the macro for platforms not having c++-safe headers. -+#undef toupper -+ - namespace MSN - { - std::pair<std::string, int> splitServerAddress(const std::string & address, int default_port) diff --git a/chat/centericq/patches/patch-ad b/chat/centericq/patches/patch-ad deleted file mode 100644 index db39bae96be..00000000000 --- a/chat/centericq/patches/patch-ad +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-ad,v 1.1 2005/03/10 14:13:24 tv Exp $ - ---- kksystr-0.1/include/kkiproc.h.orig Tue Jul 9 13:07:29 2002 -+++ kksystr-0.1/include/kkiproc.h -@@ -9,7 +9,9 @@ - #include <string.h> - #include <sys/stat.h> - #include <sys/types.h> -+#ifdef __linux__ - #include <utmp.h> -+#endif - #include <string.h> - #include <ctype.h> - diff --git a/chat/centericq/patches/patch-ae b/chat/centericq/patches/patch-ae deleted file mode 100644 index 72107410674..00000000000 --- a/chat/centericq/patches/patch-ae +++ /dev/null @@ -1,37 +0,0 @@ -$NetBSD: patch-ae,v 1.2 2005/10/16 19:28:03 tonio Exp $ - ---- src/hooks/gaduhook.cc.orig 2005-08-25 23:39:36.000000000 +0200 -+++ src/hooks/gaduhook.cc -@@ -893,6 +893,7 @@ static char *token_ocr(const char *ocr, - string gaduhook::handletoken(struct gg_http *h) { - struct gg_token *t; - string fname, r; -+ char *tmpfilep = NULL; - - if(!h) - return ""; -@@ -907,8 +908,22 @@ string gaduhook::handletoken(struct gg_h - return ""; - - do { -- fname = (getenv("TMPDIR") ? getenv("TMPDIR") : "/tmp"); -- fname += "/gg.token." + i2str(getpid()) + i2str(time(0)); -+ while (tmpfilep == NULL) { -+ char tmpnam[100]; -+ int tmpfiledes; -+ if (getenv("TMPDIR") && strlen(getenv("TMPDIR")) < 50) -+ sprintf (tmpnam, "%s/gg.token.XXXXXX", getenv("TMPDIR")); -+ else -+ sprintf (tmpnam, "/tmp/gg.token.XXXXXX"); -+ -+ if ((tmpfilep = mktemp (tmpnam)) != NULL) { -+ if ((tmpfiledes = open (tmpnam, O_CREAT | O_EXCL, S_IREAD | S_IWRITE)) == -1) -+ tmpfilep = NULL; -+ else -+ close (tmpfiledes); -+ } -+ fname = tmpnam; -+ } - } while(!access(fname.c_str(), F_OK)); - - ofstream bf(fname.c_str()); diff --git a/chat/centericq/patches/patch-af b/chat/centericq/patches/patch-af deleted file mode 100644 index 4ffe4344711..00000000000 --- a/chat/centericq/patches/patch-af +++ /dev/null @@ -1,80 +0,0 @@ -$NetBSD: patch-af,v 1.1 2005/09/19 19:42:11 adrianp Exp $ - ---- libgadu-0.1/common.c.orig 2004-07-31 11:47:20.000000000 +0100 -+++ libgadu-0.1/common.c -@@ -284,6 +284,8 @@ char *gg_read_line(int sock, char *buf, - { - int ret; - -+ if (!buf || length < 0) -+ return NULL; - for (; length > 1; buf++, length--) { - do { - if ((ret = read(sock, buf, 1)) == -1 && errno != EINTR) { -@@ -340,7 +342,7 @@ char *gg_urlencode(const char *str) - { - char *q, *buf, hex[] = "0123456789abcdef"; - const char *p; -- int size = 0; -+ unsigned int size = 0; - - if (!str && !(str = strdup(""))) - return NULL; -@@ -392,18 +394,18 @@ int gg_http_hash(const char *format, ... - va_start(ap, format); - - for (j = 0; j < strlen(format); j++) { -- unsigned char *arg, buf[16]; -+ char *arg, buf[16]; - - if (format[j] == 'u') { - snprintf(buf, sizeof(buf), "%d", va_arg(ap, uin_t)); - arg = buf; - } else { -- if (!(arg = va_arg(ap, unsigned char*))) -+ if (!(arg = va_arg(ap, char*))) - arg = ""; - } - - i = 0; -- while ((c = (int) arg[i++]) != 0) { -+ while ((c = (unsigned char) arg[i++]) != 0) { - a = (c ^ b) + (c << 8); - b = (a >> 24) | (a << 8); - } -@@ -532,7 +534,7 @@ static char gg_base64_charset[] = - char *gg_base64_encode(const char *buf) - { - char *out, *res; -- int i = 0, j = 0, k = 0, len = strlen(buf); -+ unsigned int i = 0, j = 0, k = 0, len = strlen(buf); - - res = out = malloc((len / 3 + 1) * 4 + 2); - -@@ -590,7 +592,7 @@ char *gg_base64_decode(const char *buf) - { - char *res, *save, *foo, val; - const char *end; -- int index = 0; -+ unsigned int index = 0; - - if (!buf) - return NULL; -@@ -684,7 +686,7 @@ static int gg_crc32_initialized = 0; - static void gg_crc32_make_table() - { - uint32_t h = 0; -- int i, j; -+ unsigned int i, j; - - memset(gg_crc32_table, 0, sizeof(gg_crc32_table)); - -@@ -713,6 +715,8 @@ uint32_t gg_crc32(uint32_t crc, const un - { - if (!gg_crc32_initialized) - gg_crc32_make_table(); -+ if (!buf || len < 0) -+ return crc; - - crc ^= 0xffffffffL; - diff --git a/chat/centericq/patches/patch-ag b/chat/centericq/patches/patch-ag deleted file mode 100644 index bb389286c9d..00000000000 --- a/chat/centericq/patches/patch-ag +++ /dev/null @@ -1,16 +0,0 @@ -$NetBSD: patch-ag,v 1.1 2005/09/19 19:42:11 adrianp Exp $ - ---- libgadu-0.1/dcc.c.orig 2004-01-26 23:49:33.000000000 +0000 -+++ libgadu-0.1/dcc.c -@@ -51,9 +51,9 @@ - * - buf - bufor z danymi - * - size - rozmiar danych - */ --static void gg_dcc_debug_data(const char *prefix, int fd, const void *buf, int size) -+static void gg_dcc_debug_data(const char *prefix, int fd, const void *buf, unsigned int size) - { -- int i; -+ unsigned int i; - - gg_debug(GG_DEBUG_MISC, "++ gg_dcc %s (fd=%d,len=%d)", prefix, fd, size); - diff --git a/chat/centericq/patches/patch-ah b/chat/centericq/patches/patch-ah deleted file mode 100644 index c221113feb3..00000000000 --- a/chat/centericq/patches/patch-ah +++ /dev/null @@ -1,161 +0,0 @@ -$NetBSD: patch-ah,v 1.1 2005/09/19 19:42:11 adrianp Exp $ - ---- libgadu-0.1/events.c.orig 2004-06-10 20:20:08.000000000 +0100 -+++ libgadu-0.1/events.c -@@ -27,6 +27,7 @@ - #include <arpa/inet.h> - - #include "libgadu-config.h" -+#include "libgadu.h" - - #include <errno.h> - #ifdef __GG_LIBGADU_HAVE_PTHREAD -@@ -153,7 +154,7 @@ int gg_image_queue_remove(struct gg_sess - * - e - opis zdarzenia - * - - */ --static void gg_image_queue_parse(struct gg_event *e, char *p, int len, struct gg_session *sess, uin_t sender) -+static void gg_image_queue_parse(struct gg_event *e, char *p, unsigned int len, struct gg_session *sess, uin_t sender) - { - struct gg_msg_image_reply *i = (void*) p; - struct gg_image_queue *q, *qq; -@@ -285,7 +286,7 @@ static int gg_handle_recv_msg(struct gg_ - - count = gg_fix32(m->count); - -- if (p + count * sizeof(uin_t) > packet_end) { -+ if (p + count * sizeof(uin_t) > packet_end || p + count * sizeof(uin_t) < p || count > 0xffff) { - gg_debug(GG_DEBUG_MISC, "// gg_handle_recv_msg() packet out of bounds (1.5)\n"); - goto malformed; - } -@@ -296,8 +297,11 @@ static int gg_handle_recv_msg(struct gg_ - goto fail; - } - -- for (i = 0; i < count; i++, p += sizeof(uin_t)) -- e->event.msg.recipients[i] = gg_fix32(*((uint32_t*) p)); -+ for (i = 0; i < count; i++, p += sizeof(uint32_t)) { -+ uint32_t u; -+ memcpy(&u, p, sizeof(uint32_t)); -+ e->event.msg.recipients[i] = gg_fix32(u); -+ } - - e->event.msg.recipients_count = count; - -@@ -306,15 +310,15 @@ static int gg_handle_recv_msg(struct gg_ - - case 0x02: /* richtext */ - { -- unsigned short len; -+ uint16_t len; - char *buf; - - if (p + 3 > packet_end) { - gg_debug(GG_DEBUG_MISC, "// gg_handle_recv_msg() packet out of bounds (2)\n"); - goto malformed; - } -- -- len = gg_fix16(*((unsigned short*) (p + 1))); -+ memcpy(&len, p + 1, sizeof(uint16_t)); -+ len = gg_fix16(len); - - if (!(buf = malloc(len))) { - gg_debug(GG_DEBUG_MISC, "// gg_handle_recv_msg() not enough memory for richtext data\n"); -@@ -361,12 +365,22 @@ static int gg_handle_recv_msg(struct gg_ - case 0x05: /* image_reply */ - case 0x06: - { -- if (p + sizeof(struct gg_msg_image_reply) + 1 > packet_end) { -+ struct gg_msg_image_reply *rep = (void*)p; -+ -+ if (p + sizeof(struct gg_msg_image_reply) == packet_end) { -+ e->type = GG_EVENT_IMAGE_REPLY; -+ e->event.image_reply.sender = gg_fix32(r->sender); -+ e->event.image_reply.size = 0; -+ e->event.image_reply.crc32 = gg_fix32(rep->crc32); -+ e->event.image_reply.filename = NULL; -+ e->event.image_reply.image = NULL; -+ } else if (p + sizeof(struct gg_msg_image_reply) + 1 > packet_end) { - gg_debug(GG_DEBUG_MISC, "// gg_handle_recv_msg() packet out of bounds (4)\n"); - goto malformed; - } -- -- gg_image_queue_parse(e, p, (int)(packet_end - p), sess, gg_fix32(r->sender)); -+ rep->size = gg_fix32(rep->size); -+ rep->crc32 = gg_fix32(rep->crc32); -+ gg_image_queue_parse(e, p, (unsigned int)(packet_end - p), sess, gg_fix32(r->sender)); - - return 0; - } -@@ -443,7 +457,7 @@ static int gg_watch_fd_connected(struct - case GG_NOTIFY_REPLY: - { - struct gg_notify_reply *n = (void*) p; -- int count, i; -+ unsigned int count, i; - char *tmp; - - gg_debug(GG_DEBUG_MISC, "// gg_watch_fd_connected() received a notify reply\n"); -@@ -454,7 +468,7 @@ static int gg_watch_fd_connected(struct - goto fail; - } - -- if (gg_fix32(n->status) == GG_STATUS_BUSY_DESCR || gg_fix32(n->status == GG_STATUS_NOT_AVAIL_DESCR) || gg_fix32(n->status) == GG_STATUS_AVAIL_DESCR) { -+ if (gg_fix32(n->status) == GG_STATUS_BUSY_DESCR || gg_fix32(n->status) == GG_STATUS_NOT_AVAIL_DESCR || gg_fix32(n->status) == GG_STATUS_AVAIL_DESCR) { - e->type = GG_EVENT_NOTIFY_DESCR; - - if (!(e->event.notify_descr.notify = (void*) malloc(sizeof(*n) * 2))) { -@@ -557,6 +571,8 @@ static int gg_watch_fd_connected(struct - e->event.notify60[i].descr = NULL; - e->event.notify60[i].time = 0; - -+ if (uin & 0x40000000) -+ e->event.notify60[i].version |= GG_HAS_AUDIO_MASK; - if (GG_S_D(n->status)) { - unsigned char descr_len = *((char*) n + sizeof(struct gg_notify_reply60)); - -@@ -628,8 +644,11 @@ static int gg_watch_fd_connected(struct - - e->event.status60.descr = buf; - -- if (len > 4 && p[h->length - 5] == 0) -- e->event.status60.time = *((int*) (p + h->length - 4)); -+ if (len > 4 && p[h->length - 5] == 0) { -+ uint32_t t; -+ memcpy(&t, p + h->length - 4, sizeof(uint32_t)); -+ e->event.status60.time = gg_fix32(t); -+ } - } - - break; -@@ -695,7 +714,7 @@ static int gg_watch_fd_connected(struct - - if (h->length > 1) { - char *tmp; -- int len = (sess->userlist_reply) ? strlen(sess->userlist_reply) : 0; -+ unsigned int len = (sess->userlist_reply) ? strlen(sess->userlist_reply) : 0; - - gg_debug(GG_DEBUG_MISC, "userlist_reply=%p, len=%d\n", sess->userlist_reply, len); - -@@ -1336,7 +1355,11 @@ struct gg_event *gg_watch_fd(struct gg_s - free(sess->password); - sess->password = NULL; - -- gg_debug(GG_DEBUG_MISC, "// gg_watch_fd() gg_dcc_ip = %s\n", inet_ntoa(*((struct in_addr*) &gg_dcc_ip))); -+ { -+ struct in_addr dcc_ip; -+ dcc_ip.s_addr = gg_dcc_ip; -+ gg_debug(GG_DEBUG_MISC, "// gg_watch_fd() gg_dcc_ip = %s\n", inet_ntoa(dcc_ip)); -+ } - - if (gg_dcc_ip == (unsigned long) inet_addr("255.255.255.255")) { - struct sockaddr_in sin; -@@ -1363,7 +1386,7 @@ struct gg_event *gg_watch_fd(struct gg_s - - if (sess->external_addr && sess->external_port > 1023) { - l.external_ip = sess->external_addr; -- l.external_port = sess->external_port; -+ l.external_port = gg_fix16(sess->external_port); - } - - gg_debug(GG_DEBUG_TRAFFIC, "// gg_watch_fd() sending GG_LOGIN60 packet\n"); diff --git a/chat/centericq/patches/patch-ai b/chat/centericq/patches/patch-ai deleted file mode 100644 index ac708434087..00000000000 --- a/chat/centericq/patches/patch-ai +++ /dev/null @@ -1,31 +0,0 @@ -$NetBSD: patch-ai,v 1.1 2005/09/19 19:42:11 adrianp Exp $ - ---- libgadu-0.1/http.c.orig 2005-01-23 13:22:37.000000000 +0000 -+++ libgadu-0.1/http.c -@@ -264,7 +264,7 @@ int gg_http_watch_fd(struct gg_http *h) - } - - if (h->state == GG_STATE_SENDING_QUERY) { -- unsigned int res; -+ int res; - - if ((res = write(h->fd, h->query, strlen(h->query))) < 1) { - gg_debug(GG_DEBUG_MISC, "=> http, write() failed (len=%d, res=%d, errno=%d)\n", strlen(h->query), res, errno); -@@ -293,7 +293,7 @@ int gg_http_watch_fd(struct gg_http *h) - - if (h->state == GG_STATE_READING_HEADER) { - char buf[1024], *tmp; -- unsigned int res; -+ int res; - - if ((res = read(h->fd, buf, sizeof(buf))) == -1) { - gg_debug(GG_DEBUG_MISC, "=> http, reading header failed (errno=%d)\n", errno); -@@ -401,7 +401,7 @@ int gg_http_watch_fd(struct gg_http *h) - - if (h->state == GG_STATE_READING_DATA) { - char buf[1024]; -- unsigned int res; -+ int res; - - if ((res = read(h->fd, buf, sizeof(buf))) == -1) { - gg_debug(GG_DEBUG_MISC, "=> http, reading body failed (errno=%d)\n", errno); diff --git a/chat/centericq/patches/patch-aj b/chat/centericq/patches/patch-aj deleted file mode 100644 index fa9a1d38314..00000000000 --- a/chat/centericq/patches/patch-aj +++ /dev/null @@ -1,83 +0,0 @@ -$NetBSD: patch-aj,v 1.1 2005/09/19 19:42:11 adrianp Exp $ - ---- libgadu-0.1/libgadu.c.orig 2004-03-30 23:44:07.000000000 +0100 -+++ libgadu-0.1/libgadu.c -@@ -378,7 +378,7 @@ int gg_read(struct gg_session *sess, cha - */ - int gg_write(struct gg_session *sess, const char *buf, int length) - { -- int res; -+ int res = 0; - - #ifdef __GG_LIBGADU_HAVE_OPENSSL - if (sess->ssl) { -@@ -415,7 +415,8 @@ void *gg_recv_packet(struct gg_session * - { - struct gg_header h; - char *buf = NULL; -- int ret = 0, offset, size = 0; -+ int ret = 0; -+ unsigned int offset, size = 0; - - gg_debug(GG_DEBUG_FUNCTION, "** gg_recv_packet(%p);\n", sess); - -@@ -477,7 +478,7 @@ void *gg_recv_packet(struct gg_session * - memcpy(&h, sess->recv_buf, sizeof(h)); - - /* jakieś sensowne limity na rozmiar pakietu */ -- if (h.length < 0 || h.length > 65535) { -+ if (h.length > 65535) { - gg_debug(GG_DEBUG_MISC, "// gg_recv_packet() invalid packet length (%d)\n", h.length); - errno = ERANGE; - return NULL; -@@ -503,11 +504,18 @@ void *gg_recv_packet(struct gg_session * - while (size > 0) { - ret = gg_read(sess, buf + sizeof(h) + offset, size); - gg_debug(GG_DEBUG_MISC, "// gg_recv_packet() body recv(%d,%p,%d) = %d\n", sess->fd, buf + sizeof(h) + offset, size, ret); -+ if (!ret) { -+ gg_debug(GG_DEBUG_MISC, "// gg_recv_packet() failed: connection broken\n"); -+ errno = ECONNRESET; -+ return NULL; -+ } - if (ret > -1 && ret <= size) { - offset += ret; - size -= ret; - } else if (ret == -1) { -+ int errno2 = errno; - gg_debug(GG_DEBUG_MISC, "// gg_recv_packet() body recv() failed (errno=%d, %s)\n", errno, strerror(errno)); -+ errno = errno2; - if (errno == EAGAIN) { - gg_debug(GG_DEBUG_MISC, "// gg_recv_packet() %d bytes received, %d left\n", offset, size); - sess->recv_buf = buf; -@@ -558,9 +566,9 @@ int gg_send_packet(struct gg_session *se - { - struct gg_header *h; - char *tmp; -- int tmp_length; -+ unsigned int tmp_length; - void *payload; -- int payload_length; -+ unsigned int payload_length; - va_list ap; - int res; - -@@ -584,7 +592,9 @@ int gg_send_packet(struct gg_session *se - while (payload) { - char *tmp2; - -- payload_length = va_arg(ap, int); -+ if (payload_length < 0) -+ gg_debug(GG_DEBUG_MISC, "// gg_send_packet() invalid payload length (%d)\n", payload_length); -+ payload_length = va_arg(ap, unsigned int); - - if (payload_length < 0) - gg_debug(GG_DEBUG_MISC, "// gg_send_packet() invalid payload length (%d)\n", payload_length); -@@ -1150,7 +1160,7 @@ int gg_image_reply(struct gg_session *se - struct gg_send_msg s; - const char *tmp; - char buf[1910]; -- int res; -+ int res = -1; - - gg_debug(GG_DEBUG_FUNCTION, "** gg_image_reply(%p, %d, \"%s\", %p, %d);\n", sess, recipient, filename, image, size); - diff --git a/chat/centericq/patches/patch-ak b/chat/centericq/patches/patch-ak deleted file mode 100644 index daef14e61e4..00000000000 --- a/chat/centericq/patches/patch-ak +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ak,v 1.1 2005/09/19 19:42:11 adrianp Exp $ - ---- libgadu-0.1/libgadu.h.orig 2004-06-10 20:20:08.000000000 +0100 -+++ libgadu-0.1/libgadu.h -@@ -351,7 +351,7 @@ struct gg_login_params { - int tls; /* czy łączymy po TLS? */ - int image_size; /* maksymalny rozmiar obrazka w KiB */ - -- char dummy[7 * sizeof(int)]; /* miejsce na kolejnych 8 zmiennych, -+ char dummy[6 * sizeof(int)]; /* miejsce na kolejnych 8 zmiennych, - * żeby z dodaniem parametru nie - * zmieniał się rozmiar struktury */ - }; diff --git a/chat/centericq/patches/patch-al b/chat/centericq/patches/patch-al deleted file mode 100644 index 6c2168a6d2f..00000000000 --- a/chat/centericq/patches/patch-al +++ /dev/null @@ -1,25 +0,0 @@ -$NetBSD: patch-al,v 1.1 2005/10/16 19:28:03 tonio Exp $ - ---- connwrap-0.1/configure.orig 2005-09-02 16:45:54.000000000 +0200 -+++ connwrap-0.1/configure -@@ -388,13 +388,13 @@ EOF - ;; - - *) -- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -- echo "configure: warning: $ac_option: invalid host type" 1>&2 -- fi -- if test "x$nonopt" != xNONE; then -- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } -- fi -- nonopt="$ac_option" -+ #if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -+ # echo "configure: warning: $ac_option: invalid host type" 1>&2 -+ #fi -+ #if test "x$nonopt" != xNONE; then -+ # { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } -+ #fi -+ #nonopt="$ac_option" - ;; - - esac diff --git a/chat/centericq/patches/patch-am b/chat/centericq/patches/patch-am deleted file mode 100644 index 905db050a86..00000000000 --- a/chat/centericq/patches/patch-am +++ /dev/null @@ -1,25 +0,0 @@ -$NetBSD: patch-am,v 1.1 2005/10/16 19:28:03 tonio Exp $ - ---- kkconsui-0.1/configure.orig 2005-09-02 16:45:56.000000000 +0200 -+++ kkconsui-0.1/configure -@@ -387,13 +387,13 @@ EOF - ;; - - *) -- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -- echo "configure: warning: $ac_option: invalid host type" 1>&2 -- fi -- if test "x$nonopt" != xNONE; then -- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } -- fi -- nonopt="$ac_option" -+ #if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -+ # echo "configure: warning: $ac_option: invalid host type" 1>&2 -+ #fi -+ #if test "x$nonopt" != xNONE; then -+ # { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } -+ #fi -+ #nonopt="$ac_option" - ;; - - esac diff --git a/chat/centericq/patches/patch-an b/chat/centericq/patches/patch-an deleted file mode 100644 index a5f6293aee9..00000000000 --- a/chat/centericq/patches/patch-an +++ /dev/null @@ -1,25 +0,0 @@ -$NetBSD: patch-an,v 1.1 2005/10/16 19:28:03 tonio Exp $ - ---- kkstrtext-0.1/configure.orig 2005-09-02 16:45:56.000000000 +0200 -+++ kkstrtext-0.1/configure -@@ -387,13 +387,13 @@ EOF - ;; - - *) -- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -- echo "configure: warning: $ac_option: invalid host type" 1>&2 -- fi -- if test "x$nonopt" != xNONE; then -- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } -- fi -- nonopt="$ac_option" -+ #if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -+ # echo "configure: warning: $ac_option: invalid host type" 1>&2 -+ #fi -+ #if test "x$nonopt" != xNONE; then -+ # { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } -+ #fi -+ #nonopt="$ac_option" - ;; - - esac diff --git a/chat/centericq/patches/patch-ao b/chat/centericq/patches/patch-ao deleted file mode 100644 index 6d4d7b8e44a..00000000000 --- a/chat/centericq/patches/patch-ao +++ /dev/null @@ -1,25 +0,0 @@ -$NetBSD: patch-ao,v 1.1 2005/10/16 19:28:03 tonio Exp $ - ---- kksystr-0.1/configure.orig 2005-09-02 16:45:56.000000000 +0200 -+++ kksystr-0.1/configure -@@ -380,13 +380,13 @@ EOF - ;; - - *) -- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -- echo "configure: warning: $ac_option: invalid host type" 1>&2 -- fi -- if test "x$nonopt" != xNONE; then -- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } -- fi -- nonopt="$ac_option" -+ #if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -+ # echo "configure: warning: $ac_option: invalid host type" 1>&2 -+ #fi -+ #if test "x$nonopt" != xNONE; then -+ # { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } -+ #fi -+ #nonopt="$ac_option" - ;; - - esac diff --git a/chat/centericq/patches/patch-ap b/chat/centericq/patches/patch-ap deleted file mode 100644 index d9bc054ea60..00000000000 --- a/chat/centericq/patches/patch-ap +++ /dev/null @@ -1,25 +0,0 @@ -$NetBSD: patch-ap,v 1.1 2005/10/16 19:28:03 tonio Exp $ - ---- libicq2000-0.1/configure.orig 2005-09-02 16:45:58.000000000 +0200 -+++ libicq2000-0.1/configure -@@ -380,13 +380,13 @@ EOF - ;; - - *) -- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -- echo "configure: warning: $ac_option: invalid host type" 1>&2 -- fi -- if test "x$nonopt" != xNONE; then -- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } -- fi -- nonopt="$ac_option" -+ #if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -+ # echo "configure: warning: $ac_option: invalid host type" 1>&2 -+ #fi -+ #if test "x$nonopt" != xNONE; then -+ # { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } -+ #fi -+ #nonopt="$ac_option" - ;; - - esac diff --git a/chat/centericq/patches/patch-aq b/chat/centericq/patches/patch-aq deleted file mode 100644 index e093f894f6c..00000000000 --- a/chat/centericq/patches/patch-aq +++ /dev/null @@ -1,25 +0,0 @@ -$NetBSD: patch-aq,v 1.1 2005/10/16 19:28:03 tonio Exp $ - ---- libjabber-0.1/configure.orig 2005-09-02 16:45:58.000000000 +0200 -+++ libjabber-0.1/configure -@@ -382,13 +382,13 @@ EOF - ;; - - *) -- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -- echo "configure: warning: $ac_option: invalid host type" 1>&2 -- fi -- if test "x$nonopt" != xNONE; then -- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } -- fi -- nonopt="$ac_option" -+ #if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -+ # echo "configure: warning: $ac_option: invalid host type" 1>&2 -+ #fi -+ #if test "x$nonopt" != xNONE; then -+ # { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } -+ #fi -+ #nonopt="$ac_option" - ;; - - esac diff --git a/chat/centericq/patches/patch-ar b/chat/centericq/patches/patch-ar deleted file mode 100644 index abd4f21900d..00000000000 --- a/chat/centericq/patches/patch-ar +++ /dev/null @@ -1,25 +0,0 @@ -$NetBSD: patch-ar,v 1.1 2005/10/16 19:28:03 tonio Exp $ - ---- libmsn-0.1/configure.orig 2005-09-02 16:45:59.000000000 +0200 -+++ libmsn-0.1/configure -@@ -384,13 +384,13 @@ EOF - ;; - - *) -- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -- echo "configure: warning: $ac_option: invalid host type" 1>&2 -- fi -- if test "x$nonopt" != xNONE; then -- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } -- fi -- nonopt="$ac_option" -+ #if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -+ # echo "configure: warning: $ac_option: invalid host type" 1>&2 -+ #fi -+ #if test "x$nonopt" != xNONE; then -+ # { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } -+ #fi -+ #nonopt="$ac_option" - ;; - - esac diff --git a/chat/centericq/patches/patch-as b/chat/centericq/patches/patch-as deleted file mode 100644 index 0a43c2c607d..00000000000 --- a/chat/centericq/patches/patch-as +++ /dev/null @@ -1,25 +0,0 @@ -$NetBSD: patch-as,v 1.1 2005/10/16 19:28:03 tonio Exp $ - ---- libyahoo2-0.1/configure.orig 2005-09-02 16:45:59.000000000 +0200 -+++ libyahoo2-0.1/configure -@@ -382,13 +382,13 @@ EOF - ;; - - *) -- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -- echo "configure: warning: $ac_option: invalid host type" 1>&2 -- fi -- if test "x$nonopt" != xNONE; then -- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } -- fi -- nonopt="$ac_option" -+ #if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -+ # echo "configure: warning: $ac_option: invalid host type" 1>&2 -+ #fi -+ #if test "x$nonopt" != xNONE; then -+ # { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } -+ #fi -+ #nonopt="$ac_option" - ;; - - esac diff --git a/chat/centericq/patches/patch-at b/chat/centericq/patches/patch-at deleted file mode 100644 index 8c5c2a79ca1..00000000000 --- a/chat/centericq/patches/patch-at +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-at,v 1.1 2005/12/03 17:04:23 adrianp Exp $ - ---- libicq2000-0.1/src/DirectClient.cpp.orig -+++ libicq2000-0.1/src/DirectClient.cpp -@@ -162,6 +162,7 @@ - - m_recv.setLittleEndian(); - m_recv >> length; -+ if (length == 0) return; // short read, toss it back (nothing to do) - if (length > Incoming_Packet_Limit) throw ParseException("Received too long incoming packet"); - if (m_recv.remains() < length) return; // waiting for more of the packet - diff --git a/chat/centericq/patches/patch-au b/chat/centericq/patches/patch-au deleted file mode 100644 index 37c4bf1b39b..00000000000 --- a/chat/centericq/patches/patch-au +++ /dev/null @@ -1,39 +0,0 @@ -$NetBSD: patch-au,v 1.2 2007/07/19 00:43:40 lkundrak Exp $ - -Part of a fix for CVE-2007-3713. - ---- src/hooks/jabberhook.cc.orig 2007-07-19 02:34:54.000000000 +0200 -+++ src/hooks/jabberhook.cc -@@ -36,6 +36,8 @@ - #define DEFAULT_CONFSERV "conference.jabber.org" - #define PERIOD_KEEPALIVE 30 - -+#define NOTIFBUF 512 -+ - static void jidsplit(const string &jid, string &user, string &host, string &rest) { - int pos; - user = jid; -@@ -887,11 +889,6 @@ void jabberhook::gotsearchresults(xmlnod - void jabberhook::gotloggedin() { - xmlnode x; - -- x = jutil_iqnew(JPACKET__GET, NS_AGENTS); -- xmlnode_put_attrib(x, "id", "Agent List"); -- jab_send(jc, x); -- xmlnode_free(x); -- - x = jutil_iqnew(JPACKET__GET, NS_ROSTER); - xmlnode_put_attrib(x, "id", "Roster"); - jab_send(jc, x); -@@ -1289,8 +1286,9 @@ void jabberhook::gotversion(const imcont - if(vinfo.size() > 128) - vinfo.erase(128); - -- char buf[256]; -- sprintf(buf, _("The remote is using %s"), vinfo.c_str()); -+ char buf[NOTIFBUF]; -+ snprintf(buf, NOTIFBUF, _("The remote is using %s"), vinfo.c_str()); -+ buf[NOTIFBUF-1] = '\0'; - em.store(imnotification(ic, buf)); - } - } diff --git a/chat/centericq/patches/patch-av b/chat/centericq/patches/patch-av deleted file mode 100644 index 43045cc7ab3..00000000000 --- a/chat/centericq/patches/patch-av +++ /dev/null @@ -1,41 +0,0 @@ -$NetBSD: patch-av,v 1.1 2007/07/19 00:43:40 lkundrak Exp $ - ---- src/hooks/abstracthook.cc.orig 2007-07-19 02:24:38.000000000 +0200 -+++ src/hooks/abstracthook.cc -@@ -40,6 +40,8 @@ - - #include <time.h> - -+#define NOTIFBUF 512 -+ - time_t timer_current = time(0); - - abstracthook::abstracthook(protocolname aproto) -@@ -339,7 +341,7 @@ bool abstracthook::regattempt(unsigned i - - void abstracthook::log(logevent ev, ...) { - va_list ap; -- char buf[512]; -+ char buf[NOTIFBUF]; - static map<logevent, string> lst; - - if(lst.empty()) { -@@ -354,7 +356,8 @@ void abstracthook::log(logevent ev, ...) - } - - va_start(ap, ev); -- vsprintf(buf, lst[ev].c_str(), ap); -+ vsnprintf(buf, NOTIFBUF, lst[ev].c_str(), ap); -+ buf[NOTIFBUF-1] = '\0'; - va_end(ap); - - face.log((string) "+ [" + conf.getprotocolname(proto) + "] " + buf); -@@ -751,7 +754,7 @@ string abstracthook::getTimezoneIDtoStri - if(id > 24 || id < -24) { - return "Unspecified"; - } else { -- char buf[32]; -+ static char buf[32]; - sprintf(buf, "GMT %s%d:%s", id > 0 ? "-" : "+", abs(id/2), id % 2 == 0 ? "00" : "30"); - return buf; - } diff --git a/chat/centericq/patches/patch-aw b/chat/centericq/patches/patch-aw deleted file mode 100644 index bd53677ca06..00000000000 --- a/chat/centericq/patches/patch-aw +++ /dev/null @@ -1,23 +0,0 @@ -$NetBSD: patch-aw,v 1.1 2007/07/19 00:43:42 lkundrak Exp $ - ---- src/hooks/aimhook.cc.orig 2007-07-19 02:24:38.000000000 +0200 -+++ src/hooks/aimhook.cc -@@ -32,6 +32,8 @@ - #include "imlogger.h" - #include "eventmanager.h" - -+#define NOTIFBUF 512 -+ - aimhook ahook; - - aimhook::aimhook() -@@ -293,7 +295,8 @@ void aimhook::loadprofile() { - - if(access(fname.c_str(), R_OK)) { - char sbuf[512]; -- sprintf(sbuf, _("I do really enjoy the default AIM profile of centericq %s."), VERSION); -+ snprintf(sbuf, 512, _("I do really enjoy the default AIM profile of centericq %s."), VERSION); -+ sbuf[511] = '\0'; - profile.info = sbuf; - saveprofile(); - } diff --git a/chat/centericq/patches/patch-ax b/chat/centericq/patches/patch-ax deleted file mode 100644 index bc91353ccc8..00000000000 --- a/chat/centericq/patches/patch-ax +++ /dev/null @@ -1,194 +0,0 @@ -$NetBSD: patch-ax,v 1.1 2007/07/19 00:43:42 lkundrak Exp $ - -Part of a fix for CVE-2007-3713. - ---- src/hooks/irchook.cc.orig 2007-07-19 02:24:38.000000000 +0200 -+++ src/hooks/irchook.cc -@@ -35,6 +35,8 @@ - - #include <iterator> - -+#define NOTIFBUF 512 -+ - // ---------------------------------------------------------------------------- - - irchook irhook; -@@ -609,11 +611,12 @@ void irchook::rawcommand(const string &c - - void irchook::channelfatal(string room, const char *fmt, ...) { - va_list ap; -- char buf[1024]; -+ char buf[NOTIFBUF]; - vector<channelInfo>::iterator i; - - va_start(ap, fmt); -- vsprintf(buf, fmt, ap); -+ vsnprintf(buf, NOTIFBUF, fmt, ap); -+ buf[NOTIFBUF-1] = '\0'; - va_end(ap); - - if(room.substr(0, 1) != "#") -@@ -1196,7 +1199,7 @@ void irchook::errorhandler(void *connect - void irchook::nickchanged(void *connection, void *cli, ...) { - va_list ap; - icqcontact *c; -- char buf[100]; -+ char buf[NOTIFBUF]; - - va_start(ap, cli); - char *oldnick = va_arg(ap, char *); -@@ -1218,7 +1221,8 @@ void irchook::nickchanged(void *connecti - - } - -- sprintf(buf, _("The user has changed their nick from %s to %s"), oldnick, newnick); -+ snprintf(buf, NOTIFBUF, _("The user has changed their nick from %s to %s"), oldnick, newnick); -+ buf[NOTIFBUF-1] = '\0'; - em.store(imnotification(c, buf)); - } - } -@@ -1254,18 +1258,20 @@ const char * const command, const char * - - void irchook::subreply(void *conn, void *cli, const char * const nick, - const char * const command, const char * const args) { -- char buf[512]; -+ char buf[NOTIFBUF]; - - if(!strcmp(command, "PING")) { - map<string, time_t>::iterator i = irhook.pingtime.find(up(nick)); - - if(i != irhook.pingtime.end()) { -- sprintf(buf, _("PING reply from the user: %d second(s)"), time(0)-i->second); -+ snprintf(buf, NOTIFBUF, _("PING reply from the user: %d second(s)"), time(0)-i->second); -+ buf[NOTIFBUF-1] = '\0'; - em.store(imnotification(imcontact(nick, irc), buf)); - } - - } else if(!strcmp(command, "VERSION")) { -- sprintf(buf, _("The remote is using %s"), args); -+ snprintf(buf, NOTIFBUF, _("The remote is using %s"), args); -+ buf[NOTIFBUF-1] = '\0'; - em.store(imnotification(imcontact(nick, irc), buf)); - - } -@@ -1378,8 +1384,9 @@ void irchook::chatuserjoined(void *conn, - if(strlen(email)) - uname += (string) " (" + email + ")"; - -- char buf[512]; -- sprintf(buf, _("%s has joined."), uname.c_str()); -+ char buf[NOTIFBUF]; -+ snprintf(buf, NOTIFBUF, _("%s has joined."), uname.c_str()); -+ buf[NOTIFBUF-1] = '\0'; - em.store(imnotification(imcontact(room, irc), buf)); - } - } -@@ -1395,14 +1402,16 @@ void irchook::chatuserleft(void *conn, v - - if(conf.getourid(irc).nickname != who) { - string text; -- char buf[512]; -+ char buf[NOTIFBUF]; - -- sprintf(buf, _("%s has left"), who); text = buf; -+ snprintf(buf, NOTIFBUF, _("%s has left"), who); text = buf; -+ buf[NOTIFBUF-1] = '\0'; - - if(reason) - if(strlen(reason)) { - if(strlen(reason) > 450) reason[450] = 0; -- sprintf(buf, _("reason: %s"), reason); -+ snprintf(buf, NOTIFBUF, _("reason: %s"), reason); -+ buf[NOTIFBUF-1] = '\0'; - text += (string) "; " + buf + "."; - } - -@@ -1422,13 +1431,15 @@ void irchook::chatuserkicked(void *conn, - - if(conf.getourid(irc).nickname != who) { - string text; -- char buf[512]; -+ char buf[NOTIFBUF]; - -- sprintf(buf, _("%s has been kicked by %s"), who, by); text = buf; -+ snprintf(buf, NOTIFBUF, _("%s has been kicked by %s"), who, by); text = buf; -+ buf[NOTIFBUF-1] = '\0'; - - if(reason) - if(strlen(reason)) { -- sprintf(buf, _("reason: %s"), reason); -+ snprintf(buf, NOTIFBUF, _("reason: %s"), reason); -+ buf[NOTIFBUF-1] = '\0'; - text += (string) "; " + buf + "."; - } - -@@ -1451,13 +1462,15 @@ void irchook::chatgottopic(void *conn, v - return; - - string text; -- char buf[1024]; -- sprintf(buf, _("Channel topic now is: %s"), topic); -+ char buf[NOTIFBUF]; -+ snprintf(buf, NOTIFBUF, _("Channel topic now is: %s"), topic); -+ buf[NOTIFBUF-1] = '\0'; - text = buf; - - if(author) - if(strlen(author)) { -- sprintf(buf, _("set by %s"), author); -+ snprintf(buf, NOTIFBUF, _("set by %s"), author); -+ buf[NOTIFBUF-1] = '\0'; - text += (string) "; " + buf + "."; - } - -@@ -1474,8 +1487,9 @@ void irchook::chatuseropped(void *conn, - va_end(ap); - - if(by) { -- char buf[512]; -- sprintf(buf, _("%s has been opped by %s."), who, by); -+ char buf[NOTIFBUF]; -+ snprintf(buf, NOTIFBUF, _("%s has been opped by %s."), who, by); -+ buf[NOTIFBUF-1] = '\0'; - em.store(imnotification(imcontact(room, irc), buf)); - } - } -@@ -1490,8 +1504,9 @@ void irchook::chatuserdeopped(void *conn - va_end(ap); - - if(by) { -- char buf[512]; -- sprintf(buf, _("%s has been deopped by %s."), who, by); -+ char buf[NOTIFBUF]; -+ snprintf(buf, NOTIFBUF, _("%s has been deopped by %s."), who, by); -+ buf[NOTIFBUF-1] = '\0'; - em.store(imnotification(imcontact(room, irc), buf)); - } - } -@@ -1504,10 +1519,10 @@ void irchook::chatopped(void *conn, void - char *by = va_arg(ap, char *); - va_end(ap); - -- char buf[512]; -- if(by) sprintf(buf, _("%s has opped us."), by); -- else strcpy(buf, _("you are an op here")); -- -+ char buf[NOTIFBUF]; -+ if(by) snprintf(buf, NOTIFBUF, _("%s has opped us."), by); -+ else strncpy(buf, _("you are an op here"), NOTIFBUF); -+ buf[NOTIFBUF-1] = '\0'; - em.store(imnotification(imcontact(room, irc), buf)); - } - -@@ -1519,8 +1534,9 @@ void irchook::chatdeopped(void *conn, vo - char *by = va_arg(ap, char *); - va_end(ap); - -- char buf[512]; -- sprintf(buf, _("%s has deopped us."), by); -+ char buf[NOTIFBUF]; -+ snprintf(buf, NOTIFBUF, _("%s has deopped us."), by); -+ buf[NOTIFBUF-1] = '\0'; - em.store(imnotification(imcontact(room, irc), buf)); - } - diff --git a/chat/centericq/patches/patch-ay b/chat/centericq/patches/patch-ay deleted file mode 100644 index 89cbfca290f..00000000000 --- a/chat/centericq/patches/patch-ay +++ /dev/null @@ -1,46 +0,0 @@ -$NetBSD: patch-ay,v 1.1 2007/07/19 00:43:43 lkundrak Exp $ - -Part of a fix for CVE-2007-3713. - ---- src/hooks/ljhook.cc.orig 2005-01-07 02:27:04.000000000 +0100 -+++ src/hooks/ljhook.cc -@@ -37,6 +37,8 @@ ljhook lhook; - - #define PERIOD_FRIENDS 3600 - -+#define NOTIFBUF 512 -+ - ljhook::ljhook(): abstracthook(livejournal), fonline(false), sdest(0) { - fcapabs.insert(hookcapab::nochat); - } -@@ -654,7 +656,7 @@ void ljhook::messageack_cb(MessageEvent - map<string, string> nfriendof; - map<string, string>::const_iterator in; - vector<string>::iterator il; -- char buf[512]; -+ char buf[NOTIFBUF]; - - for(i = 1; i <= count; i++) { - username = params[(string) "friendof_" + i2str(i) + "_user"]; -@@ -669,8 +671,9 @@ void ljhook::messageack_cb(MessageEvent - if(!foempty) { - bd = (string) "http://" + conf.getourid(proto).server + "/users/" + in->first; - -- sprintf(buf, _("The user %s (%s) has added you to his/her friend list\n\nJournal address: %s"), -+ snprintf(buf, NOTIFBUF, _("The user %s (%s) has added you to his/her friend list\n\nJournal address: %s"), - in->first.c_str(), in->second.c_str(), bd.c_str()); -+ buf[NOTIFBUF-1] = '\0'; - - em.store(imnotification(self, buf)); - } -@@ -679,8 +682,9 @@ void ljhook::messageack_cb(MessageEvent - for(il = friendof.begin(); il != friendof.end(); ) { - if(nfriendof.find(*il) == nfriendof.end()) { - bd = (string) "http://" + conf.getourid(proto).server + "/users/" + *il; -- sprintf(buf, _("The user %s has removed you from his/her friend list\n\nJournal address: %s"), -+ snprintf(buf, NOTIFBUF, _("The user %s has removed you from his/her friend list\n\nJournal address: %s"), - il->c_str(), bd.c_str()); -+ buf[NOTIFBUF-1] = '\0'; - em.store(imnotification(self, buf)); - friendof.erase(il); - il = friendof.begin(); diff --git a/chat/centericq/patches/patch-az b/chat/centericq/patches/patch-az deleted file mode 100644 index c17a7fa1491..00000000000 --- a/chat/centericq/patches/patch-az +++ /dev/null @@ -1,108 +0,0 @@ -$NetBSD: patch-az,v 1.1 2007/07/19 00:43:43 lkundrak Exp $ - -Part of a fix for CVE-2007-3713. - ---- src/hooks/yahoohook.cc.orig 2007-07-19 02:24:38.000000000 +0200 -+++ src/hooks/yahoohook.cc -@@ -47,6 +47,8 @@ - #define PERIOD_REFRESH 60 - #define PERIOD_CLOSE 6 - -+#define NOTIFBUF 512 -+ - int yahoohook::yfd::connection_tags = 0; - - char pager_host[255], pager_port[255], filetransfer_host[255], -@@ -844,7 +846,7 @@ void yahoohook::got_conf_invite(int id, - icqconf::imaccount acc = conf.getourid(yahoo); - string confname = (string) "#" + room, inviter, text; - vector<string>::iterator ic; -- char buf[1024]; -+ char buf[NOTIFBUF]; - int i; - - imcontact cont(confname, yahoo); -@@ -856,10 +858,11 @@ void yahoohook::got_conf_invite(int id, - inviter.erase(i); - } - -- sprintf(buf, _("The user %s has invited you to the %s conference, the topic there is: %s"), -+ snprintf(buf, NOTIFBUF, _("The user %s has invited you to the %s conference, the topic there is: %s"), - yhook.rusconv("wk", inviter).c_str(), - yhook.rusconv("wk", room).c_str(), - yhook.rusconv("wk", msg).c_str()); -+ buf[NOTIFBUF-1] = '\0'; - - text = (string) buf + "\n\n" + _("Current conference members are: "); - yhook.confmembers[room].push_back(inviter); -@@ -888,20 +891,22 @@ void yahoohook::got_conf_invite(int id, - - void yahoohook::conf_userdecline(int id, char *who, char *room, char *msg) { - icqcontact *c = clist.get(imcontact((string) "#" + room, yahoo)); -- char buf[512]; -+ char buf[NOTIFBUF]; - - if(c) { -- sprintf(buf, _("The user %s has declined your invitation to join the conference"), who); -+ snprintf(buf, NOTIFBUF, _("The user %s has declined your invitation to join the conference"), who); -+ buf[NOTIFBUF-1] = '\0'; - em.store(imnotification(c, buf)); - } - } - - void yahoohook::conf_userjoin(int id, char *who, char *room) { - icqcontact *c = clist.get(imcontact((string) "#" + room, yahoo)); -- char buf[512]; -+ char buf[NOTIFBUF]; - - if(c) { -- sprintf(buf, _("The user %s has joined the conference"), who); -+ snprintf(buf, NOTIFBUF, _("The user %s has joined the conference"), who); -+ buf[NOTIFBUF-1] = '\0'; - - if(find(yhook.confmembers[room].begin(), yhook.confmembers[room].end(), who) == yhook.confmembers[room].end()) - yhook.confmembers[room].push_back(who); -@@ -912,11 +917,12 @@ void yahoohook::conf_userjoin(int id, ch - - void yahoohook::conf_userleave(int id, char *who, char *room) { - icqcontact *c = clist.get(imcontact((string) "#" + room, yahoo)); -- char buf[512]; -+ char buf[NOTIFBUF]; - vector<string>::iterator im; - - if(c) { -- sprintf(buf, _("The user %s has left the conference"), who); -+ snprintf(buf, NOTIFBUF, _("The user %s has left the conference"), who); -+ buf[NOTIFBUF-1] = '\0'; - em.store(imnotification(c, buf)); - - im = find(yhook.confmembers[room].begin(), yhook.confmembers[room].end(), who); -@@ -981,10 +987,11 @@ void yahoohook::game_notify(int id, char - } - - void yahoohook::mail_notify(int id, char *from, char *subj, int cnt) { -- char buf[1024]; -+ char buf[NOTIFBUF]; - - if(from && subj) { -- sprintf(buf, _("+ [yahoo] e-mail from %s, %s"), from, subj); -+ snprintf(buf, NOTIFBUF, _("+ [yahoo] e-mail from %s, %s"), from, subj); -+ buf[NOTIFBUF-1] = '\0'; - face.log(buf); - clist.get(contactroot)->playsound(imevent::email); - } -@@ -1138,11 +1145,12 @@ void yahoohook::webcam_data_request(int - - int yahoohook::ylog(char *fmt, ...) { - if(conf.getdebug()) { -- char buf[512]; -+ char buf[NOTIFBUF]; - va_list ap; - - va_start(ap, fmt); -- vsprintf(buf, fmt, ap); -+ vsnprintf(buf, NOTIFBUF, fmt, ap); -+ buf[NOTIFBUF-1] = '\0'; - va_end(ap); - - face.log(buf); diff --git a/chat/centericq/patches/patch-ba b/chat/centericq/patches/patch-ba deleted file mode 100644 index 2d4abe0a852..00000000000 --- a/chat/centericq/patches/patch-ba +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ba,v 1.1 2008/08/02 20:26:21 dholland Exp $ - ---- kkconsui-0.1/src/texteditor.cc~ 2003-09-09 17:51:33.000000000 -0400 -+++ kkconsui-0.1/src/texteditor.cc 2008-08-02 16:05:41.000000000 -0400 -@@ -1940,7 +1940,7 @@ void texteditor::undorecordfree(void *p) - } - - int texteditor::findint(void *p1, void *p2) { -- return *(int *) p1 != (int) p2; -+ return *(int *) p1 != (int)(intptr_t) p2; - } - - int texteditor::findhighline(void *p1, void *p2) { diff --git a/chat/centericq/patches/patch-bb b/chat/centericq/patches/patch-bb deleted file mode 100644 index f0b92361bbd..00000000000 --- a/chat/centericq/patches/patch-bb +++ /dev/null @@ -1,25 +0,0 @@ -$NetBSD: patch-bb,v 1.1 2008/08/02 20:26:21 dholland Exp $ - ---- kkstrtext-0.1/kkstrtext.cc~ 2005-01-31 19:13:24.000000000 -0500 -+++ kkstrtext-0.1/kkstrtext.cc 2008-08-02 16:08:30.000000000 -0400 -@@ -430,9 +430,11 @@ int stringcompare(void *s1, void *s2) { - } - } - -+#if 0 /* unused */ - int intcompare(void *s1, void *s2) { - return (int) s1 != (int) s2; - } -+#endif - - string i2str(int i) { - char buf[64]; -@@ -885,7 +887,7 @@ string siconv(const string &atext, const - #ifdef HAVE_ICONV - iconv_t cd = iconv_open(tocs.c_str(), fromcs.c_str()); - -- if(((int) cd) != -1) { -+ if (cd != (iconv_t)-1) { - string r, text(atext); - size_t inleft, outleft, soutleft; - char *inbuf, *outbuf, *sinbuf, *soutbuf; diff --git a/chat/centericq/patches/patch-bc b/chat/centericq/patches/patch-bc deleted file mode 100644 index 7585a132cfa..00000000000 --- a/chat/centericq/patches/patch-bc +++ /dev/null @@ -1,49 +0,0 @@ -$NetBSD: patch-bc,v 1.1 2008/08/02 20:26:21 dholland Exp $ - ---- src/icqdialogs.cc~ 2005-05-23 17:16:52.000000000 -0400 -+++ src/icqdialogs.cc 2008-08-02 16:13:22.000000000 -0400 -@@ -894,7 +894,7 @@ void icqface::selectcountry(unsigned sho - i = m.open(); - m.close(); - -- if(i) f = (unsigned short) ((int) m.getref(i-1)); -+ if(i) f = (unsigned short) ((int)(intptr_t) m.getref(i-1)); - } - - void icqface::selectlanguage(unsigned short &f) { -@@ -946,7 +946,7 @@ void icqface::selectgender(imgender &f) - int i = m.open(); - m.close(); - -- if(i) f = (imgender) ((int) m.getref(i-1)); -+ if(i) f = (imgender) ((int)(intptr_t) m.getref(i-1)); - } - - void icqface::selectagerange(ICQ2000::AgeRange &r) { -@@ -967,7 +967,7 @@ void icqface::selectagerange(ICQ2000::Ag - int i = m.open(); - m.close(); - -- if(i) r = (ICQ2000::AgeRange) ((int) m.getref(i-1)); -+ if(i) r = (ICQ2000::AgeRange) ((int)(intptr_t) m.getref(i-1)); - } - - bool icqface::edit(string &txt, const string &header) { -@@ -1256,7 +1256,7 @@ bool icqface::updateconf(icqconf::regsou - - void *p; - finished = !db.open(n, b, &p); -- i = (int) p; -+ i = (int)(intptr_t) p; - - if(!finished) - switch(b) { -@@ -1750,7 +1750,7 @@ void icqface::transfermonitor() { - it = transfers.end(); - - if(!db.gettree()->isnode(db.gettree()->getid(np-1))) -- it = transfers.begin() + (int) db.getmenu()->getref(n-1); -+ it = transfers.begin() + (intptr_t) db.getmenu()->getref(n-1); - - switch(b) { - case 0: diff --git a/chat/centericq/patches/patch-bd b/chat/centericq/patches/patch-bd deleted file mode 100644 index ef475ae79a0..00000000000 --- a/chat/centericq/patches/patch-bd +++ /dev/null @@ -1,58 +0,0 @@ -$NetBSD: patch-bd,v 1.1 2008/08/02 20:26:21 dholland Exp $ - ---- src/icqface.cc~ 2005-08-27 21:33:21.000000000 -0400 -+++ src/icqface.cc 2008-08-02 16:15:47.000000000 -0400 -@@ -401,7 +401,7 @@ int icqface::contextmenu(icqcontact *c) - - m.scale(); - m.idle = &menuidle; -- i = (int) m.getref(m.open()-1); -+ i = (int)(intptr_t) m.getref(m.open()-1); - m.close(); - - if(i) lastr = i; -@@ -450,7 +450,7 @@ int icqface::generalmenu() { - - if(i) { - lastitem = i-1; -- r = (int) m.getref(lastitem); -+ r = (int)(intptr_t) m.getref(lastitem); - } - - return r; -@@ -513,7 +513,7 @@ icqcontact *icqface::mainloop(int &actio - g = 0; - } - -- if((unsigned int) c < 100) c = 0; -+ if((uintptr_t) c < 100) c = 0; - - if(i) { - switch(action = extk) { -@@ -1484,7 +1484,7 @@ bool icqface::changestatus(vector<protoc - m.scale(); - - i = m.open(); -- choice = (int) m.getref(i-1); -+ choice = (int)(intptr_t) m.getref(i-1); - - m.close(); - } -@@ -1539,7 +1539,7 @@ bool icqface::changestatus(vector<protoc - m.close(); - - if(r = i) { -- st = (imstatus) ((int) m.getref(i-1)); -+ st = (imstatus) ((int)(intptr_t) m.getref(i-1)); - } - } - -@@ -2132,7 +2132,7 @@ void icqface::quickfind(verticalmenu *mu - c = (icqcontact *) cm->getref(i); - } - -- if((unsigned int) c > 100) { -+ if((uintptr_t) c > 100) { - string current = c->getdispnick(); - len = current.size(); - if(len > nick.size()) len = nick.size(); |