diff options
author | Yohann Ferreira <bertram@cegetel.net> | 2005-08-25 21:07:28 +0000 |
---|---|---|
committer | Yohann Ferreira <bertram@cegetel.net> | 2005-08-25 21:07:28 +0000 |
commit | 941e0cfda282b2461e500fcdf5828a7e20bf6da6 (patch) | |
tree | 16b392cb9c57fefc621084c011ec0b724e84d128 /src/main.h | |
parent | 9ba130f4628d8e52ebd50b810e761a81f69c0c4a (diff) | |
download | mana-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.h | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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; |