summaryrefslogtreecommitdiff
path: root/src/main.h
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/main.h
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/main.h')
-rw-r--r--src/main.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/main.h b/src/main.h
index 2dd4f87a..8546cfe6 100644
--- a/src/main.h
+++ b/src/main.h
@@ -51,15 +51,18 @@ enum {
* to be able to use strncpy instead of strcpy for
* security and stability reasons
*/
-#define LEN_USERNAME 25
-#define LEN_PASSWORD 25
+#define LEN_MAX_USERNAME 25
+#define LEN_MIN_USERNAME 4
+#define LEN_MAX_PASSWORD 25
+#define LEN_MIN_PASSWORD 4
+#include <string>
extern Image *login_wallpaper;
-extern char username[25];
-extern char password[25];
+extern std::string username;
+extern std::string password;
extern int map_address, char_ID;
extern short map_port;
-extern char map_name[16];
+extern std::string map_name;
extern int account_ID, session_ID1, session_ID2;
extern char sex, n_server, n_character;
extern unsigned char state;