summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-08-25 21:07:28 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-08-25 21:07:28 +0000
commit941e0cfda282b2461e500fcdf5828a7e20bf6da6 (patch)
tree16b392cb9c57fefc621084c011ec0b724e84d128 /src/resources
parent9ba130f4628d8e52ebd50b810e761a81f69c0c4a (diff)
downloadmana-941e0cfda282b2461e500fcdf5828a7e20bf6da6.tar.gz
mana-941e0cfda282b2461e500fcdf5828a7e20bf6da6.tar.bz2
mana-941e0cfda282b2461e500fcdf5828a7e20bf6da6.tar.xz
mana-941e0cfda282b2461e500fcdf5828a7e20bf6da6.zip
Adding min and max length check for password, more code cleanups in login and removing possible buffer overflows by replacing some global char[] by std::strings.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/buddylist.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resources/buddylist.cpp b/src/resources/buddylist.cpp
index 6293bc84..2e2cdea6 100644
--- a/src/resources/buddylist.cpp
+++ b/src/resources/buddylist.cpp
@@ -53,8 +53,8 @@ void BuddyList::loadFile(void)
}
do {
- buddy = (char *) calloc(LEN_USERNAME, sizeof(char));
- inputStream.getline(buddy, LEN_USERNAME);
+ buddy = (char *) calloc(LEN_MAX_USERNAME, sizeof(char));
+ inputStream.getline(buddy, LEN_MAX_USERNAME);
// Ugly ?
if(strcmp(buddy,"") != 0) buddylist.push_back(buddy);
free(buddy);