21.12.2018, 20:36
Hello.. i recived this...
WHAT IS WRONG??
This is possible to crash server? (but to not receive any errors in server log?)?
Код:
[23:29:06] OnPlayerLogin(10) Begin [23:29:06] sscanf warning: String buffer overflow. [23:29:06] sscanf warning: String buffer overflow. [23:29:06] sscanf warning: String buffer overflow. [23:29:06] sscanf warning: String buffer overflow. [23:29:06] sscanf warning: String buffer overflow. [23:29:06] sscanf warning: String buffer overflow. [23:29:06] sscanf warning: String buffer overflow. [23:29:06] sscanf warning: String buffer overflow. [23:29:06] sscanf warning: String buffer overflow. [23:29:06] sscanf warning: String buffer overflow. [23:29:06] sscanf warning: String buffer overflow. [23:29:06] sscanf warning: String buffer overflow. [23:29:06] sscanf warning: String buffer overflow. [23:29:06] sscanf warning: String buffer overflow. [23:29:06] sscanf warning: String buffer overflow. [23:29:06] sscanf warning: String buffer overflow. [23:29:06] vasqueZ has logged in [23:29:06] OnPlayerLogin(10) End [23:29:06] OnPlayerSpawn(10) Begin [23:29:06] OnPlayerSpawn(10) End [23:29:06] OnPlayerSpawn(10) Begin [23:29:06] OnPlayerSpawn(10) End
Код:
public OnPlayerLogin(playerid, password[]) { printf("OnPlayerLogin(%d) Begin", playerid); new string[160]; format(string, sizeof(string), "Accounts/%s.ini", LinuxName[playerid]); new File: UserFile = fopen(string, io_read); if(UserFile) { new InformatioN[160], ValName[32]; fread(UserFile, InformatioN, sizeof(InformatioN)); sscanf(InformatioN, "p<=>s[32]s[132]", ValName, string); if(!strcmp(ValName, "Key", false)) strmid(PlayerInfo[playerid][pKey], string, 0, strlen(string)-1, 32); fread(UserFile, InformatioN, sizeof(InformatioN)); sscanf(InformatioN, "p<=>s[32]s[132]", ValName, string);
This is possible to crash server? (but to not receive any errors in server log?)?