Hello community, here is the log from the commit of package irssi for openSUSE:Factory checked in at 2018-02-16 21:44:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/irssi (Old) and /work/SRC/openSUSE:Factory/.irssi.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "irssi" Fri Feb 16 21:44:29 2018 rev:51 rq:577099 version:1.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/irssi/irssi.changes 2018-01-17 21:58:44.993980239 +0100 +++ /work/SRC/openSUSE:Factory/.irssi.new/irssi.changes 2018-02-16 21:44:30.915427529 +0100 @@ -1,0 +2,26 @@ +Thu Feb 15 11:08:19 UTC 2018 - ailin.ne...@gmail.com + +- update to 1.1.1 (bsc#1081238): + - Restore compatibility with OpenSSL < 1.0.2 (#820, #831) + - Fix test compilation on some platforms (#815, #816) + - Fix portability and backwards compatibility of test runner + (#818, #845) + - Prevent use after free error during the execution of some + commands. Found by Joseph Bisch (GL#17, GL!24). + - Revert netsplit print optimisation due to crashes (#465, #809, + #812, #819, #824). CVE-2018-7054 + - Fix use after free when SASL messages are received in + unexpected order (GL#26, GL!33). CVE-2018-7053 + - Fix null pointer dereference in the tab completion when an + empty nick is joined (GL#24, GL!31). CVE-2018-7050 + - Fix use after free when entering oper password (GL#22, + GL!32). + - Fix null pointer dereference when too many windows are + opened (GL#27, #837). CVE-2018-7052 + - Fix out of bounds access in theme strings when the last + escape is incomplete. Credit to Oss-Fuzz (#842). CVE-2018-7051 + - Fix out of bounds write when using negative counts on window + resize (GL#25, GL#29, #836). + - Minor help correction. By William Jackson (#834). + +------------------------------------------------------------------- Old: ---- irssi-1.1.0.tar.xz irssi-1.1.0.tar.xz.asc New: ---- irssi-1.1.1.tar.xz irssi-1.1.1.tar.xz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ irssi.spec ++++++ --- /var/tmp/diff_new_pack.o7pBI0/_old 2018-02-16 21:44:31.627401852 +0100 +++ /var/tmp/diff_new_pack.o7pBI0/_new 2018-02-16 21:44:31.631401707 +0100 @@ -18,7 +18,7 @@ %bcond_with socks Name: irssi -Version: 1.1.0 +Version: 1.1.1 Release: 0 # Summary: Modular, Secure, and Well Designed IRC Client ++++++ irssi-1.1.0.tar.xz -> irssi-1.1.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/ChangeLog new/irssi-1.1.1/ChangeLog --- old/irssi-1.1.0/ChangeLog 2018-01-14 21:22:35.000000000 +0100 +++ new/irssi-1.1.1/ChangeLog 2018-02-15 01:05:25.000000000 +0100 @@ -1,3 +1,125 @@ +commit 8cec161a8f252fd8d57677eb961ffd87987b9d30 +Author: ailin-nemui <ailin-ne...@users.noreply.github.com> +Date: Tue Feb 13 12:56:25 2018 +0100 + + tag as 1.1.1 + +commit 84473ad57c67c796e385e8c1c72f76036e31d91e +Author: ailin-nemui <ailin-ne...@users.noreply.github.com> +Date: Thu Feb 15 00:55:30 2018 +0100 + + Merge tag '1.0.7' into integrate/1.0.7 + + (cherry picked from commit 666ddc2ecdd9ad7bc966c78565a5fd9985e099c8) + +commit 0921f36828f00264d05fd8c7719b22495d622e10 +Author: ailin-nemui <ailin-ne...@users.noreply.github.com> +Date: Tue Feb 13 10:09:06 2018 +0100 + + Merge pull request #845 from ailin-nemui/funny-bug + + warn if there is non-portable code in the test-driver + + (cherry picked from commit c2c879e8c55afcb8a737e4535c8d878407807040) + +commit 72f81af9f0427b512675acf18fc9e5734a687725 +Author: ailin-nemui <ailin-ne...@users.noreply.github.com> +Date: Sun Feb 4 11:27:02 2018 +0100 + + Merge pull request #831 from ailin-nemui/openssl-x509 + + Do not use X509_STORE on OpenSSL < 1.0.2 + + (cherry picked from commit 9c494a88a306d386870cd5fc78c9527bd66c1c7a) + +commit 88a83989a6651575f32a0ef286af93b3af53a6f7 +Author: ailin-nemui <ailin-ne...@users.noreply.github.com> +Date: Tue Jan 16 19:12:00 2018 +0100 + + Merge pull request #816 from ailin-nemui/fix-test-libs + + fix test builds on some platforms + + (cherry picked from commit 1b7f32838557a4805029cfb17710148a948b11bf) + +commit e80d6d3093c737b50f301134891c7cf0c15df87c +Author: ailin-nemui <ailin-ne...@users.noreply.github.com> +Date: Fri Feb 2 14:09:10 2018 +0100 + + Merge pull request #818 from ailin-nemui/test-tap-backward-compat + + add backwards compatible code for running tap tests + + (cherry picked from commit 17aafe974b6251fecff4198d3dd3ab9cf1620b78) + +commit 4f7d98fe15df2ef9d4eaa5e9968bed9677920d6e +Author: ailin-nemui <ailin-ne...@users.noreply.github.com> +Date: Tue Jan 30 17:39:13 2018 +0100 + + Merge pull request #834 from williamjacksn/patch-1 + + Fix typo in help text for /ISON command + + (cherry picked from commit 6d42c4f949ab7d3d403d2f31d6a816961a180e2b) + +commit 044d6c3803ab7b4b9537fc18995fa323f4f77a57 +Author: ailin-nemui <ailin-ne...@users.noreply.github.com> +Date: Mon Feb 5 22:25:33 2018 +0100 + + Merge pull request #836 from ailin-nemui/resize + + Fix resizing of windows when used incorrectly + + (cherry picked from commit 3c1bc5f9162c90aa247d024422699710419658f6) + +commit b85c6fe9febabec5326ad7767ebd60eceb546869 +Author: ailin-nemui <ailin-ne...@users.noreply.github.com> +Date: Thu Feb 8 22:25:03 2018 +0100 + + Merge pull request #842 from ailin-nemui/themeoob + + Fix oob in escaped theme string + + (cherry picked from commit 7c31f7adc5685074d25a32737c9743089850675c) + +commit 957cbe75611743be40cb50297d9b9690bd357ec4 +Author: ailin-nemui <ailin-ne...@users.noreply.github.com> +Date: Mon Feb 5 22:24:17 2018 +0100 + + Merge pull request #837 from ailin-nemui/no-show + + check the error condition of mainwindow_create + + (cherry picked from commit 442f6f08b4d99e86c3961be71638abec0f0f8070) + +commit 890e9ed5292d133f0d417797f68ebfc562a81312 +Author: Nei <ailin.ne...@gmail.com> +Date: Tue Feb 13 09:51:22 2018 +0000 + + Merge branch 'security' into 'master' + + Security + + See merge request irssi/irssi!34 + + (cherry picked from commit b0d9cb33cd9ef9da7c331409e8b7c57a6f3aef3f) + +commit 78b5f34e13661bd1a441d4b25fcbcee5bffe08d9 +Author: ailin-nemui <ailin-ne...@users.noreply.github.com> +Date: Mon Feb 5 22:26:32 2018 +0100 + + Merge pull request #824 from dequis/more-netsplit-revert + + Revert more of the netsplit print optimisation to fix crashes + + (cherry picked from commit cfcc021c81eea84bd982a64764f62e163128acf3) + +commit 78af0c219a5cf65fc6bed104b4b9157460096425 +Author: ailin-nemui <ailin-ne...@users.noreply.github.com> +Date: Mon Jan 15 09:05:31 2018 +0100 + + clarify deprecated fn in news + commit 96e6c86dc7e5c527780e5a6e346449ea1cb663d9 Author: ailin-nemui <ailin-ne...@users.noreply.github.com> Date: Mon Jan 8 14:43:54 2018 +0100 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/NEWS new/irssi-1.1.1/NEWS --- old/irssi-1.1.0/NEWS 2018-01-14 21:21:49.000000000 +0100 +++ new/irssi-1.1.1/NEWS 2018-02-15 01:03:35.000000000 +0100 @@ -1,3 +1,29 @@ +v1.1.1 2018-02-15 The Irssi team <st...@irssi.org> + ! Contains all changes from 1.0.7 + - Restore compatibility with OpenSSL < 1.0.2 (#820, #831) + - Fix test compilation on some platforms (#815, #816) + - Fix portability and backwards compatibility of test runner + (#818, #845) + +v1.0.7 2018-02-15 The Irssi team <st...@irssi.org> + - Prevent use after free error during the execution of some + commands. Found by Joseph Bisch (GL#17, GL!24). + - Revert netsplit print optimisation due to crashes (#465, #809, + #812, #819, #824). + - Fix use after free when SASL messages are received in + unexpected order (GL#26, GL!33). + - Fix null pointer dereference in the tab completion when an + empty nick is joined (GL#24, GL!31). + - Fix use after free when entering oper password (GL#22, + GL!32). + - Fix null pointer dereference when too many windows are + opened (GL#27, #837). + - Fix out of bounds access in theme strings when the last + escape is incomplete. Credit to Oss-Fuzz (#842). + - Fix out of bounds write when using negative counts on window + resize (GL#25, GL#29, #836). + - Minor help correction. By William Jackson (#834). + v1.1.0 2018-01-15 The Irssi team <st...@irssi.org> * Colour is now re-set when reaching a comma, matching mIRC behaviour (#742, #740, #790) @@ -9,6 +35,9 @@ you from embarassing AMSGs (#659) * /server does not connect to servers anymore, use /server connect to change servers (#559, #649). + * The net_ip_compare API function is now deprecated, and the + previously deprecated net_connect has been removed. By Will + Storey (#770). + Add an option to ignore all channels or ignore all queries using /set activity_hide_targets. By Jari Matilainen (#612, #779) @@ -71,7 +100,7 @@ By Tristan Pepin (#731). By Paul Townsend (#684, #736). By Will Storey (#777) - Minor cleanups (#590). By Edward Tomasz Napierala (#734, - #738). By Will Storey (#770) + #738) - Fix space issue in glib-2.0.m4 (#621) v1.0.6 2018-01-07 The Irssi team <st...@irssi.org> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/autogen.sh new/irssi-1.1.1/autogen.sh --- old/irssi-1.1.0/autogen.sh 2018-01-07 22:39:41.000000000 +0100 +++ new/irssi-1.1.1/autogen.sh 2018-02-15 00:50:34.000000000 +0100 @@ -57,3 +57,11 @@ else echo Skipping configure process. fi + +if grep -q '==\|\[\[' "$srcdir"/build-aux/test-driver; then + echo + echo "************************************************************************" + echo "**Warning**: your build is not portable, please do not make dist" + echo " see https://bugzilla.opensuse.org/show_bug.cgi?id=1076146" + echo "************************************************************************" +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/build-aux/test-driver new/irssi-1.1.1/build-aux/test-driver --- old/irssi-1.1.0/build-aux/test-driver 2018-01-14 21:22:43.000000000 +0100 +++ new/irssi-1.1.1/build-aux/test-driver 2018-02-15 01:05:32.000000000 +0100 @@ -59,7 +59,7 @@ while test $# -gt 1; do arg=${1%=*} val=${1#*=} - if [ $arg == $val ]; then + if [ $arg = $val ]; then val=$2 shift fi @@ -75,7 +75,7 @@ --) break;; -*) usage_error "invalid option: '$1'";; esac - [[ $arg != $val ]] && shift + [ $arg != $val ] && shift done missing_opts= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/configure new/irssi-1.1.1/configure --- old/irssi-1.1.0/configure 2018-01-14 21:22:41.000000000 +0100 +++ new/irssi-1.1.1/configure 2018-02-15 01:05:31.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for irssi 1.1.0. +# Generated by GNU Autoconf 2.69 for irssi 1.1.1. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='irssi' PACKAGE_TARNAME='irssi' -PACKAGE_VERSION='1.1.0' -PACKAGE_STRING='irssi 1.1.0' +PACKAGE_VERSION='1.1.1' +PACKAGE_STRING='irssi 1.1.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1389,7 +1389,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures irssi 1.1.0 to adapt to many kinds of systems. +\`configure' configures irssi 1.1.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1459,7 +1459,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of irssi 1.1.0:";; + short | recursive ) echo "Configuration of irssi 1.1.1:";; esac cat <<\_ACEOF @@ -1604,7 +1604,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -irssi configure 1.1.0 +irssi configure 1.1.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2206,7 +2206,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by irssi $as_me 1.1.0, which was +It was created by irssi $as_me 1.1.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3075,7 +3075,7 @@ # Define the identity of the package. PACKAGE='irssi' - VERSION='1.1.0' + VERSION='1.1.1' # Some tools Automake needs. @@ -14878,7 +14878,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by irssi $as_me 1.1.0, which was +This file was extended by irssi $as_me 1.1.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14944,7 +14944,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -irssi config.status 1.1.0 +irssi config.status 1.1.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/configure.ac new/irssi-1.1.1/configure.ac --- old/irssi-1.1.0/configure.ac 2018-01-14 21:21:49.000000000 +0100 +++ new/irssi-1.1.1/configure.ac 2018-02-15 01:04:21.000000000 +0100 @@ -1,4 +1,4 @@ -AC_INIT(irssi, 1.1.0) +AC_INIT(irssi, 1.1.1) AC_CONFIG_SRCDIR([src]) AC_CONFIG_AUX_DIR(build-aux) AC_PREREQ(2.50) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/docs/help/in/ison.in new/irssi-1.1.1/docs/help/in/ison.in --- old/irssi-1.1.0/docs/help/in/ison.in 2018-01-07 22:39:41.000000000 +0100 +++ new/irssi-1.1.1/docs/help/in/ison.in 2018-02-13 12:53:37.000000000 +0100 @@ -16,5 +16,5 @@ /ISON mike /ISON sarah bob -%9See also:%9 NOTIFY, WHOAS, WHOIS +%9See also:%9 NOTIFY, WHOWAS, WHOIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/docs/help/ison new/irssi-1.1.1/docs/help/ison --- old/irssi-1.1.0/docs/help/ison 2018-01-14 21:22:35.000000000 +0100 +++ new/irssi-1.1.1/docs/help/ison 2018-02-15 01:05:25.000000000 +0100 @@ -16,5 +16,5 @@ /ISON mike /ISON sarah bob -%9See also:%9 NOTIFY, WHOAS, WHOIS +%9See also:%9 NOTIFY, WHOWAS, WHOIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/irssi-config.h new/irssi-1.1.1/irssi-config.h --- old/irssi-1.1.0/irssi-config.h 2018-01-14 21:22:48.000000000 +0100 +++ new/irssi-1.1.1/irssi-config.h 2018-02-15 01:05:36.000000000 +0100 @@ -74,7 +74,7 @@ #define PACKAGE_NAME "irssi" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "irssi 1.1.0" +#define PACKAGE_STRING "irssi 1.1.1" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "irssi" @@ -83,7 +83,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.1.0" +#define PACKAGE_VERSION "1.1.1" /* printf()-format for uoff_t, eg. "u" or "lu" or "llu" */ #define PRIuUOFF_T "lu" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/irssi-version.h new/irssi-1.1.1/irssi-version.h --- old/irssi-1.1.0/irssi-version.h 2018-01-14 21:22:49.000000000 +0100 +++ new/irssi-1.1.1/irssi-version.h 2018-02-15 01:05:37.000000000 +0100 @@ -1,2 +1,2 @@ -#define IRSSI_VERSION_DATE 20180108 -#define IRSSI_VERSION_TIME 1443 +#define IRSSI_VERSION_DATE 20180213 +#define IRSSI_VERSION_TIME 1256 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/src/core/network-openssl.c new/irssi-1.1.1/src/core/network-openssl.c --- old/irssi-1.1.0/src/core/network-openssl.c 2018-01-07 22:39:41.000000000 +0100 +++ new/irssi-1.1.1/src/core/network-openssl.c 2018-02-15 00:53:44.000000000 +0100 @@ -46,6 +46,7 @@ #endif /* OpenSSL 1.1.0 also introduced some useful additions to the api */ +#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER) static int X509_STORE_up_ref(X509_STORE *vfy) { @@ -57,6 +58,7 @@ return (n > 1) ? 1 : 0; } #endif +#endif /* ssl i/o channel object */ typedef struct @@ -72,7 +74,10 @@ } GIOSSLChannel; static int ssl_inited = FALSE; +/* https://github.com/irssi/irssi/issues/820 */ +#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) static X509_STORE *store = NULL; +#endif static void irssi_ssl_free(GIOChannel *handle) { @@ -379,7 +384,9 @@ gboolean irssi_ssl_init(void) { +#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) int success; +#endif #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) if (!OPENSSL_init_ssl(OPENSSL_INIT_SSL_DEFAULT, NULL)) { @@ -391,6 +398,8 @@ SSL_load_error_strings(); OpenSSL_add_all_algorithms(); #endif + +#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) store = X509_STORE_new(); if (store == NULL) { g_error("Could not initialize OpenSSL: X509_STORE_new() failed"); @@ -404,6 +413,7 @@ store = NULL; /* Don't return an error; the user might have their own cafile/capath. */ } +#endif ssl_inited = TRUE; @@ -522,13 +532,21 @@ g_free(scafile); g_free(scapath); verify = TRUE; - } else if (store != NULL) { + } +#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) + else if (store != NULL) { /* Make sure to increment the refcount every time the store is * used, that's essential not to get it free'd by OpenSSL when * the SSL_CTX is destroyed. */ X509_STORE_up_ref(store); SSL_CTX_set_cert_store(ctx, store); } +#else + else { + if (!SSL_CTX_set_default_verify_paths(ctx)) + g_warning("Could not load default certificates"); + } +#endif if(!(ssl = SSL_new(ctx))) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/src/fe-common/core/chat-completion.c new/irssi-1.1.1/src/fe-common/core/chat-completion.c --- old/irssi-1.1.0/src/fe-common/core/chat-completion.c 2018-01-07 22:39:41.000000000 +0100 +++ new/irssi-1.1.1/src/fe-common/core/chat-completion.c 2018-02-15 00:59:22.000000000 +0100 @@ -173,6 +173,7 @@ { CHANNEL_REC *channel; int own; + g_return_if_fail(nick != NULL); channel = channel_find(server, target); if (channel != NULL) { @@ -185,6 +186,7 @@ const char *nick, const char *address) { CHANNEL_REC *chanrec; + g_return_if_fail(nick != NULL); chanrec = channel_find(server, channel); if (chanrec != NULL) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/src/fe-common/core/themes.c new/irssi-1.1.1/src/fe-common/core/themes.c --- old/irssi-1.1.0/src/fe-common/core/themes.c 2018-01-07 22:39:41.000000000 +0100 +++ new/irssi-1.1.1/src/fe-common/core/themes.c 2018-02-15 00:59:22.000000000 +0100 @@ -473,7 +473,7 @@ str = g_string_new(NULL); p = ret; while (*p != '\0') { - if (*p == '\\') { + if (*p == '\\' && p[1] != '\0') { int chr; p++; chr = expand_escape(&p); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/src/fe-common/irc/fe-irc-commands.c new/irssi-1.1.1/src/fe-common/irc/fe-irc-commands.c --- old/irssi-1.1.0/src/fe-common/irc/fe-irc-commands.c 2018-01-07 22:39:41.000000000 +0100 +++ new/irssi-1.1.1/src/fe-common/irc/fe-irc-commands.c 2018-02-13 12:53:28.000000000 +0100 @@ -345,16 +345,18 @@ } typedef struct { - IRC_SERVER_REC *server; + char *server_tag; char *nick; } OPER_PASS_REC; static void cmd_oper_got_pass(const char *password, OPER_PASS_REC *rec) { - if (*password != '\0') - irc_send_cmdv(rec->server, "OPER %s %s", rec->nick, password); + SERVER_REC *server_rec = server_find_tag(rec->server_tag); + if (*password != '\0' && IS_IRC_SERVER(server_rec)) + irc_send_cmdv((IRC_SERVER_REC *) server_rec, "OPER %s %s", rec->nick, password); g_free(rec->nick); - g_free(rec); + g_free(rec->server_tag); + g_free(rec); } static void cmd_oper(const char *data, IRC_SERVER_REC *server) @@ -374,7 +376,7 @@ OPER_PASS_REC *rec; rec = g_new(OPER_PASS_REC, 1); - rec->server = server; + rec->server_tag = g_strdup(server->tag); rec->nick = g_strdup(*nick != '\0' ? nick : server->nick); format = format_get_text(MODULE_NAME, NULL, server, NULL, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/src/fe-common/irc/fe-netjoin.c new/irssi-1.1.1/src/fe-common/irc/fe-netjoin.c --- old/irssi-1.1.0/src/fe-common/irc/fe-netjoin.c 2018-01-14 21:21:49.000000000 +0100 +++ new/irssi-1.1.1/src/fe-common/irc/fe-netjoin.c 2018-02-15 00:59:22.000000000 +0100 @@ -245,20 +245,18 @@ message before it. */ static void sig_print_starting(TEXT_DEST_REC *dest) { - NETJOIN_SERVER_REC *rec; + GSList *tmp, *next; if (printing_joins) return; - if (!IS_IRC_SERVER(dest->server)) - return; - - if (!server_ischannel(dest->server, dest->target)) - return; + for (tmp = joinservers; tmp != NULL; tmp = next) { + NETJOIN_SERVER_REC *server = tmp->data; - rec = netjoin_find_server(IRC_SERVER(dest->server)); - if (rec != NULL && rec->netjoins != NULL) - print_netjoins(rec, NULL); + next = tmp->next; + if (server->netjoins != NULL) + print_netjoins(server, NULL); + } } static int sig_check_netjoins(void) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/src/fe-common/irc/fe-netsplit.c new/irssi-1.1.1/src/fe-common/irc/fe-netsplit.c --- old/irssi-1.1.0/src/fe-common/irc/fe-netsplit.c 2018-01-14 21:21:49.000000000 +0100 +++ new/irssi-1.1.1/src/fe-common/irc/fe-netsplit.c 2018-02-15 00:59:22.000000000 +0100 @@ -247,20 +247,17 @@ message before it. */ static void sig_print_starting(TEXT_DEST_REC *dest) { - IRC_SERVER_REC *rec; + GSList *tmp; if (printing_splits) return; - if (!IS_IRC_SERVER(dest->server)) - return; - - if (!server_ischannel(dest->server, dest->target)) - return; + for (tmp = servers; tmp != NULL; tmp = tmp->next) { + IRC_SERVER_REC *rec = tmp->data; - rec = IRC_SERVER(dest->server); - if (rec->split_servers != NULL) - print_splits(rec, NULL); + if (IS_IRC_SERVER(rec) && rec->split_servers != NULL) + print_splits(rec, NULL); + } } static int sig_check_splits(void) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/src/fe-text/mainwindows.c new/irssi-1.1.1/src/fe-text/mainwindows.c --- old/irssi-1.1.0/src/fe-text/mainwindows.c 2018-01-07 22:39:41.000000000 +0100 +++ new/irssi-1.1.1/src/fe-text/mainwindows.c 2018-02-15 00:59:22.000000000 +0100 @@ -543,6 +543,8 @@ { MAIN_WINDOW_REC *shrink_win; + g_return_val_if_fail(count >= 0, FALSE); + shrink_win = mainwindows_find_lower(window->last_line); if (shrink_win != NULL && MAIN_WINDOW_TEXT_HEIGHT(shrink_win)-count >= WINDOW_MIN_SIZE) { @@ -559,6 +561,8 @@ { MAIN_WINDOW_REC *shrink_win; + g_return_val_if_fail(count >= 0, FALSE); + shrink_win = mainwindows_find_upper(window->first_line); if (shrink_win != NULL && MAIN_WINDOW_TEXT_HEIGHT(shrink_win)-count >= WINDOW_MIN_SIZE) { @@ -614,6 +618,8 @@ static int mainwindow_shrink(MAIN_WINDOW_REC *window, int count, int resize_lower) { + g_return_val_if_fail(count >= 0, FALSE); + if (MAIN_WINDOW_TEXT_HEIGHT(window)-count < WINDOW_MIN_SIZE) return FALSE; @@ -657,19 +663,29 @@ } } +static void mainwindow_grow_int(int count) +{ + if (count == 0) { + return; + } else if (count < 0) { + if (!mainwindow_shrink(WINDOW_MAIN(active_win), -count, FALSE)) { + printformat_window(active_win, MSGLEVEL_CLIENTNOTICE, TXT_WINDOW_TOO_SMALL); + } + } else { + if (!mainwindow_grow(WINDOW_MAIN(active_win), count, FALSE)) { + printformat_window(active_win, MSGLEVEL_CLIENTNOTICE, TXT_WINDOW_TOO_SMALL); + } + } +} + /* SYNTAX: WINDOW GROW [<lines>] */ static void cmd_window_grow(const char *data) { - MAIN_WINDOW_REC *window; int count; count = *data == '\0' ? 1 : atoi(data); - window = WINDOW_MAIN(active_win); - if (!mainwindow_grow(window, count, FALSE)) { - printformat_window(active_win, MSGLEVEL_CLIENTNOTICE, - TXT_WINDOW_TOO_SMALL); - } + mainwindow_grow_int(count); } /* SYNTAX: WINDOW SHRINK [<lines>] */ @@ -678,16 +694,14 @@ int count; count = *data == '\0' ? 1 : atoi(data); - if (!mainwindow_shrink(WINDOW_MAIN(active_win), count, FALSE)) { - printformat_window(active_win, MSGLEVEL_CLIENTNOTICE, - TXT_WINDOW_TOO_SMALL); - } + if (count < -INT_MAX) count = -INT_MAX; + + mainwindow_grow_int(-count); } /* SYNTAX: WINDOW SIZE <lines> */ static void cmd_window_size(const char *data) { - char sizestr[MAX_INT_STRLEN]; int size; if (!is_numeric(data, 0)) return; @@ -695,13 +709,9 @@ size -= WINDOW_MAIN(active_win)->height - WINDOW_MAIN(active_win)->statusbar_lines; - if (size == 0) return; + if (size < -INT_MAX) size = -INT_MAX; - ltoa(sizestr, size < 0 ? -size : size); - if (size < 0) - cmd_window_shrink(sizestr); - else - cmd_window_grow(sizestr); + mainwindow_grow_int(size); } /* SYNTAX: WINDOW BALANCE */ @@ -810,6 +820,11 @@ } parent = mainwindow_create(); + if (parent == NULL) { + printformat_window(active_win, MSGLEVEL_CLIENTERROR, TXT_WINDOW_TOO_SMALL); + return; + } + parent->active = window; gui_window_reparent(window, parent); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/src/irc/core/sasl.c new/irssi-1.1.1/src/irc/core/sasl.c --- old/irssi-1.1.0/src/irc/core/sasl.c 2018-01-07 22:39:41.000000000 +0100 +++ new/irssi-1.1.1/src/irc/core/sasl.c 2018-02-15 00:52:21.000000000 +0100 @@ -55,10 +55,21 @@ return FALSE; } +static void sasl_timeout_stop(IRC_SERVER_REC *server) +{ + /* Stop any pending timeout, if any */ + if (server->sasl_timeout != 0) { + g_source_remove(server->sasl_timeout); + server->sasl_timeout = 0; + } +} + static void sasl_start(IRC_SERVER_REC *server, const char *data, const char *from) { IRC_SERVER_CONNECT_REC *conn; + sasl_timeout_stop(server); + conn = server->connrec; switch (conn->sasl_mechanism) { @@ -77,11 +88,6 @@ { char *params, *error; - /* Stop any pending timeout, if any */ - if (server->sasl_timeout != 0) { - g_source_remove(server->sasl_timeout); - server->sasl_timeout = 0; - } params = event_get_params(data, 2, NULL, &error); @@ -97,10 +103,7 @@ static void sasl_already(IRC_SERVER_REC *server, const char *data, const char *from) { - if (server->sasl_timeout != 0) { - g_source_remove(server->sasl_timeout); - server->sasl_timeout = 0; - } + sasl_timeout_stop(server); server->sasl_success = TRUE; @@ -112,10 +115,7 @@ static void sasl_success(IRC_SERVER_REC *server, const char *data, const char *from) { - if (server->sasl_timeout != 0) { - g_source_remove(server->sasl_timeout); - server->sasl_timeout = 0; - } + sasl_timeout_stop(server); server->sasl_success = TRUE; @@ -265,7 +265,7 @@ irc_send_cmd_now(server, "AUTHENTICATE *"); cap_finish_negotiation(server); - server->sasl_timeout = 0; + sasl_timeout_stop(server); signal_emit("server sasl failure", 2, server, "The server sent an invalid payload"); } @@ -274,11 +274,7 @@ { GString *req = NULL; - /* Stop the timer */ - if (server->sasl_timeout != 0) { - g_source_remove(server->sasl_timeout); - server->sasl_timeout = 0; - } + sasl_timeout_stop(server); if (!sasl_reassemble_incoming(server, data, &req)) { sasl_step_fail(server); @@ -302,10 +298,7 @@ return; } - if (server->sasl_timeout != 0) { - g_source_remove(server->sasl_timeout); - server->sasl_timeout = 0; - } + sasl_timeout_stop(server); } void sasl_init(void) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/tests/fe-common/core/Makefile.am new/irssi-1.1.1/tests/fe-common/core/Makefile.am --- old/irssi-1.1.0/tests/fe-common/core/Makefile.am 2018-01-07 22:39:41.000000000 +0100 +++ new/irssi-1.1.1/tests/fe-common/core/Makefile.am 2018-02-15 00:50:34.000000000 +0100 @@ -21,8 +21,7 @@ ../../../src/fe-common/core/libfe_common_core.a \ ../../../src/core/libcore.a \ ../../../src/lib-config/libirssi_config.a \ - @GLIB_LIBS@ \ - @OPENSSL_LIBS@ + @PROG_LIBS@ test_formats_SOURCES = \ test-formats.c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/tests/fe-common/core/Makefile.in new/irssi-1.1.1/tests/fe-common/core/Makefile.in --- old/irssi-1.1.0/tests/fe-common/core/Makefile.in 2018-01-14 21:22:43.000000000 +0100 +++ new/irssi-1.1.1/tests/fe-common/core/Makefile.in 2018-02-15 01:05:32.000000000 +0100 @@ -645,8 +645,7 @@ ../../../src/fe-common/core/libfe_common_core.a \ ../../../src/core/libcore.a \ ../../../src/lib-config/libirssi_config.a \ - @GLIB_LIBS@ \ - @OPENSSL_LIBS@ + @PROG_LIBS@ test_formats_SOURCES = \ test-formats.c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/tests/irc/core/Makefile.am new/irssi-1.1.1/tests/irc/core/Makefile.am --- old/irssi-1.1.0/tests/irc/core/Makefile.am 2018-01-07 22:39:41.000000000 +0100 +++ new/irssi-1.1.1/tests/irc/core/Makefile.am 2018-02-15 00:50:34.000000000 +0100 @@ -22,8 +22,7 @@ ../../../src/irc/core/libirc_core.a \ ../../../src/core/libcore.a \ ../../../src/lib-config/libirssi_config.a \ - @GLIB_LIBS@ \ - @OPENSSL_LIBS@ + @PROG_LIBS@ test_irc_SOURCES = \ test-irc.c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/tests/irc/core/Makefile.in new/irssi-1.1.1/tests/irc/core/Makefile.in --- old/irssi-1.1.0/tests/irc/core/Makefile.in 2018-01-14 21:22:43.000000000 +0100 +++ new/irssi-1.1.1/tests/irc/core/Makefile.in 2018-02-15 01:05:33.000000000 +0100 @@ -646,8 +646,7 @@ ../../../src/irc/core/libirc_core.a \ ../../../src/core/libcore.a \ ../../../src/lib-config/libirssi_config.a \ - @GLIB_LIBS@ \ - @OPENSSL_LIBS@ + @PROG_LIBS@ test_irc_SOURCES = \ test-irc.c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/irssi-1.1.0/utils/tap-test new/irssi-1.1.1/utils/tap-test --- old/irssi-1.1.0/utils/tap-test 2018-01-07 22:39:41.000000000 +0100 +++ new/irssi-1.1.1/utils/tap-test 2018-02-15 00:50:34.000000000 +0100 @@ -2,4 +2,22 @@ # run a GTest in tap mode. The test binary is passed as $1 -$1 -k --tap +t="$1"; shift +if ${PKG_CONFIG:-pkg-config} --atleast-version 2.40 glib-2.0; then +exec "$t" -k --tap "$@" +else # GTest does not support tap yet + (((("$t" "$@"; echo $? >&3) | ${AM_TAP_AWK:-awk} ' +{ + if (/: /) { + i++ + ok = /: OK/ + sub(/:/, " #") + print (ok ? "ok " : "not ok ") i " " $0 + } else { + print "# " $0 + } +} END { + print 1 ".." i +} +' >&4) 3>&1) | (read xs; exit $xs)) 4>&1 +fi