diff options
| author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-03-19 01:40:01 +0000 |
|---|---|---|
| committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-03-19 01:40:01 +0000 |
| commit | ace25983a48768adad2713435b634c326f078a9e (patch) | |
| tree | 6af6cdf81c67e303c6b283c4b9941d1312768aa3 | |
| parent | bb7b8e27ee1c32c79b99268f257ae32a28ea87cf (diff) | |
Fixed bug #1143 - Fixed a blind sprintf in sighandler that would write an error message to unallocated memory
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2821 5417fbe8-f217-4b02-8779-1006273d7864
| -rw-r--r-- | src/main.c | 6 | ||||
| -rw-r--r-- | version.log | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c index 5996dcf4f..2fa3a8f21 100644 --- a/src/main.c +++ b/src/main.c @@ -331,7 +331,7 @@ void sighandler(int signum) * always set when we need it. It seems some signals slip through to the * QUIT code without having a valid quitmsg. -GD */ - quitmsg = sstrdup("Signal Received"); + quitmsg = "Signal Received"; if (started) { #ifndef _WIN32 if (signum == SIGHUP) { /* SIGHUP = save databases and restart */ @@ -362,8 +362,8 @@ void sighandler(int signum) save_databases(); if (!read_config(1)) { - sprintf(quitmsg, - "Error Reading Configuration File (Received SIGUSR2)"); + static char *buf = "Error Reading Configuration File (Received SIGUSR2)"; + quitmsg = buf; quitting = 1; } send_event(EVENT_RELOAD, 1, EVENT_START); diff --git a/version.log b/version.log index fb3bcec20..fc36f1134 100644 --- a/version.log +++ b/version.log @@ -9,10 +9,11 @@ VERSION_MAJOR="1" VERSION_MINOR="8" VERSION_PATCH="3" VERSION_EXTRA="-svn" -VERSION_BUILD="2818" +VERSION_BUILD="2821" # $Log$ # Changes since 1.8.3 Release +#Revision 2821 - Fixed bug #1143 - Fixed a blind sprintf in sighandler that would write an error message to unallocated memory #Revision 2819 - Fixed a bug introduced in r2667 that could cause some access entries to not convert to XOP correctly #Revision 2818 - Fixed bug #1141, reordered some access checks in cs_kick and cs_modes to hide who is on the channel #Revision 2816 - Fixed os_info to display syntax errors if you entered no text |
