summaryrefslogtreecommitdiff
path: root/src/core/enc_none.c
diff options
context:
space:
mode:
authorviper viper@31f1291d-b8d6-0310-a050-a5561fc1590b <viper viper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-20 14:45:38 +0000
committerviper viper@31f1291d-b8d6-0310-a050-a5561fc1590b <viper viper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-20 14:45:38 +0000
commit02f126c36e3460fecd23429f45f203f9a935b92c (patch)
tree78b7f2f5617356d10aded29d79fa227b2c81e05e /src/core/enc_none.c
parent4f3f2b2cd4ed0b1f0dac5e86026d4612ab4616c6 (diff)
BUILD : 1.7.22 (1446) BUGS : NOTES : Removed password truncating and fixed a crashbug in enc_none. This build still crashes on CS GETPASS on some systems though. Someone take a look at termination of ci->founderpass pls.
git-svn-id: svn://svn.anope.org/anope/trunk@1446 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1160 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core/enc_none.c')
-rw-r--r--src/core/enc_none.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/enc_none.c b/src/core/enc_none.c
index 2e6316648..871a85620 100644
--- a/src/core/enc_none.c
+++ b/src/core/enc_none.c
@@ -61,8 +61,9 @@ int plain_encrypt_check_len(int passlen, int bufsize) {
}
int plain_decrypt(const char *src, char *dest, int size) {
- memset(dest,0,size+1);
+ memset(dest,0,size);
strncpy(dest,src,size);
+ dest[size] = '\0';
return 1;
}