From b1dc23a455281b60507be380c2ea124f012d56d5 Mon Sep 17 00:00:00 2001 From: "geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Sun, 2 Oct 2005 20:18:30 +0000 Subject: [PATCH] BUILD : 1.7.11 (911) BUGS : NOTES : Added a check to os_stats to see if we actually have a param to avoid segs git-svn-id: svn://svn.anope.org/anope/trunk@911 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@657 5417fbe8-f217-4b02-8779-1006273d7864 --- Changes | 1 + src/core/os_stats.c | 2 +- version.log | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 470a35387..41b615e5f 100644 --- a/Changes +++ b/Changes @@ -4,6 +4,7 @@ Provided by Anope Dev. - 2005 10/01 A Information on uplink server can be displayed via OperServ STATS. [ #00] 09/29 A Configuration option to change fantasy command prefix character. [ #00] 09/28 A Event for fantasy commands triggered without channel access. [ #00] +10/02 F Added check in OperServ stats to avoid segfault without param. [ #00] 10/02 F Numeric 219 didn't give correct letter for STATS u. [ #00] 10/02 F ChanServ HOP was available on IRCDs without halfop support. [ #00] 10/01 F Placed capab tokens and flags into a table for easier handling. [ #00] diff --git a/src/core/os_stats.c b/src/core/os_stats.c index 7e15d018e..28d2a4293 100644 --- a/src/core/os_stats.c +++ b/src/core/os_stats.c @@ -233,7 +233,7 @@ int do_stats(User * u) } } - if ((stricmp(extra, "MEMORY") != 0) && (stricmp(extra, "UPLINK") != 0)) { + if (!extra || ((stricmp(extra, "MEMORY") != 0) && (stricmp(extra, "UPLINK") != 0))) { notice_lang(s_OperServ, u, OPER_STATS_CURRENT_USERS, usercnt, opcnt); tm = localtime(&maxusertime); strftime_lang(timebuf, sizeof(timebuf), u, STRFTIME_DATE_TIME_FORMAT, diff --git a/version.log b/version.log index 6d81f3cd3..0c7365aaa 100644 --- a/version.log +++ b/version.log @@ -9,10 +9,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="11" VERSION_EXTRA="-svn" -VERSION_BUILD="910" +VERSION_BUILD="911" # $Log$ # +# BUILD : 1.7.11 (911) +# BUGS : +# NOTES : Added a check to os_stats to see if we actually have a param to avoid segs +# # BUILD : 1.7.11 (910) # BUGS : # NOTES : Fixed some stats not passing the correct letter to anope_cmd_219