From: <ps...@us...> - 2010-08-18 07:57:30
|
Revision: 2102 http://znc.svn.sourceforge.net/znc/?rev=2102&view=rev Author: psychon Date: 2010-08-18 07:57:23 +0000 (Wed, 18 Aug 2010) Log Message: ----------- Fix a NULL pointer dereference in route_replies When there was only one client with a pending request and that client disconnected from ZNC, we didn't destroy the timeout. This means that the associated timer eventually fired and then tried to display which request caused the timeout. But since we already cleaned up the rest, this resulted in a NULL pointer dereference. This commit fixes also another bug: If two different clients got pending requests and the client whose request was currently handled disconnected, we didn't send the other client's request to the IRCd. Modified Paths: -------------- trunk/configure trunk/configure.in trunk/main.h trunk/modules/route_replies.cpp Modified: trunk/configure =================================================================== --- trunk/configure 2010-08-09 13:17:08 UTC (rev 2101) +++ trunk/configure 2010-08-18 07:57:23 UTC (rev 2102) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for znc 0.093. +# Generated by GNU Autoconf 2.65 for znc 0.094-rc1. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -548,8 +548,8 @@ # Identity of this package. PACKAGE_NAME='znc' PACKAGE_TARNAME='znc' -PACKAGE_VERSION='0.093' -PACKAGE_STRING='znc 0.093' +PACKAGE_VERSION='0.094-rc1' +PACKAGE_STRING='znc 0.094-rc1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1209,7 +1209,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 znc 0.093 to adapt to many kinds of systems. +\`configure' configures znc 0.094-rc1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1274,7 +1274,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of znc 0.093:";; + short | recursive ) echo "Configuration of znc 0.094-rc1:";; esac cat <<\_ACEOF @@ -1393,7 +1393,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -znc configure 0.093 +znc configure 0.094-rc1 generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. @@ -1561,7 +1561,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by znc $as_me 0.093, which was +It was created by znc $as_me 0.094-rc1, which was generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -4530,7 +4530,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by znc $as_me 0.093, which was +This file was extended by znc $as_me 0.094-rc1, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4583,7 +4583,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -znc config.status 0.093 +znc config.status 0.094-rc1 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" @@ -5140,7 +5140,7 @@ echo -echo znc 0.093 configured +echo znc 0.094-rc1 configured echo echo "prefix: $prefix" echo "debug: $DEBUG" Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2010-08-09 13:17:08 UTC (rev 2101) +++ trunk/configure.in 2010-08-18 07:57:23 UTC (rev 2102) @@ -1,5 +1,5 @@ dnl Keep the version number in sync with main.h! -AC_INIT([znc], [0.093]) +AC_INIT([znc], [0.094-rc1]) AC_CONFIG_SRCDIR([znc.cpp]) AC_LANG([C++]) Modified: trunk/main.h =================================================================== --- trunk/main.h 2010-08-09 13:17:08 UTC (rev 2101) +++ trunk/main.h 2010-08-18 07:57:23 UTC (rev 2102) @@ -11,7 +11,7 @@ // The following defines are for #if comparison (preprocessor only likes ints) #define VERSION_MAJOR 0 -#define VERSION_MINOR 93 +#define VERSION_MINOR 94 // This one is for display purpose #define VERSION (VERSION_MAJOR + VERSION_MINOR / 1000.0) @@ -19,6 +19,8 @@ #ifndef VERSION_EXTRA #define VERSION_EXTRA "" #endif +#undef VERSION_EXTRA +#define VERSION_EXTRA "-rc1" #ifndef _MODDIR_ #define _MODDIR_ "/usr/lib/znc" Modified: trunk/modules/route_replies.cpp =================================================================== --- trunk/modules/route_replies.cpp 2010-08-09 13:17:08 UTC (rev 2101) +++ trunk/modules/route_replies.cpp 2010-08-18 07:57:23 UTC (rev 2102) @@ -195,16 +195,17 @@ if (m_pClient == m_pDoing) { // The replies which aren't received yet will be // broadcasted to everyone, but at least nothing breaks + RemTimer("RouteTimeout"); m_pDoing = NULL; m_pReplies = NULL; } it = m_vsPending.find(m_pClient); - if (it == m_vsPending.end()) - return; + if (it != m_vsPending.end()) + m_vsPending.erase(it); - m_vsPending.erase(it); + SendRequest(); } virtual EModRet OnRaw(CString& sLine) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |