Fix out-of-bounds error in cryptit() found by Coverity.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@240 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
[Changes 1.2c01]
|
[Changes 1.2c01]
|
||||||
|
|
||||||
|
* Fix out-of-bounds error in cryptit() found by Coverity. (flashback)
|
||||||
|
|
||||||
* Cleanup save_formats(). (caf)
|
* Cleanup save_formats(). (caf)
|
||||||
|
|
||||||
* Fix off-by-one error in add_socketread() and set_socketwrite() found
|
* Fix off-by-one error in add_socketread() and set_socketwrite() found
|
||||||
|
|||||||
@@ -2826,8 +2826,8 @@ static char saltChars[] =
|
|||||||
"abcdefghijklmnopqrstuvwxyzABCDEFGHJIKLMNOPQRSTUVWXYZ./";
|
"abcdefghijklmnopqrstuvwxyzABCDEFGHJIKLMNOPQRSTUVWXYZ./";
|
||||||
char *cpass = (char *)string;
|
char *cpass = (char *)string;
|
||||||
char salt[3];
|
char salt[3];
|
||||||
salt[0] = saltChars[random_number(0) % 64];
|
salt[0] = saltChars[random_number(0) % sizeof(saltChars)];
|
||||||
salt[1] = saltChars[random_number(0) % 64];
|
salt[1] = saltChars[random_number(0) % sizeof(saltChars)];
|
||||||
salt[2] = 0;
|
salt[2] = 0;
|
||||||
#if !defined(WINNT)
|
#if !defined(WINNT)
|
||||||
cpass = crypt(string, salt);
|
cpass = crypt(string, salt);
|
||||||
|
|||||||
Reference in New Issue
Block a user