From d500efe45d398a770bcf1c169b840f606ef475ae Mon Sep 17 00:00:00 2001 From: "certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Sat, 18 Mar 2006 11:06:29 +0000 Subject: [PATCH] # BUILD : 1.7.13 (1009) # BUGS : 460 # NOTES : fixed sstrdup(NULL) in cs_akick.c git-svn-id: svn://svn.anope.org/anope/trunk@1009 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@734 5417fbe8-f217-4b02-8779-1006273d7864 --- Changes | 1 + src/core/cs_akick.c | 9 +++++++-- version.log | 6 +++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index 9012c049b..12677be6e 100644 --- a/Changes +++ b/Changes @@ -36,6 +36,7 @@ Provided by Anope Dev. - 2006 03/02 F Fixed memleak in do_cmode(). [#430] 03/03 F Rage, Bahamut and Viagra will now use the correct server desc. [#467] 03/03 F Fixed botserv's mode behaviour with protect umode. [#333] +03/18 F Fixed sstrdup() with NULL argument in cs_akick.c. [#460] Provided by nenolod. - 2006 02/03 A Support for Charybdis IRCd. [ #00] diff --git a/src/core/cs_akick.c b/src/core/cs_akick.c index dd729da98..89d171228 100644 --- a/src/core/cs_akick.c +++ b/src/core/cs_akick.c @@ -451,8 +451,13 @@ int do_akick(User * u) ci->akick[a].u.mask = sstrdup(ci->akick[b].u.mask); } - ci->akick[a].reason = - sstrdup(ci->akick[b].reason); + /* maybe we should first check whether there + is a reason before we sstdrup it -Certus */ + if (ci->akick[b].reason) + ci->akick[a].reason = + sstrdup(ci->akick[b].reason); + else + ci->akick[a].reason = NULL; ci->akick[a].creator = sstrdup(ci->akick[b].creator); ci->akick[a].addtime = ci->akick[b].addtime; diff --git a/version.log b/version.log index 866595387..b0fcb3a53 100644 --- a/version.log +++ b/version.log @@ -9,10 +9,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="13" VERSION_EXTRA="-svn" -VERSION_BUILD="1008" +VERSION_BUILD="1009" # $Log$ # +# BUILD : 1.7.13 (1009) +# BUGS : 460 +# NOTES : fixed sstrdup(NULL) in cs_akick.c +# # BUILD : 1.7.13 (1008) # BUGS : 473 474 # NOTES : gcc switches and win98 stop, thx 2 trystan