06.09.2017, 20:13
Quote:
|
The problem is more likely that your salt is not terminated with a null terminator. When you print a string memory is read until the next null terminator is found. If there isn't a null terminator at the end of the string then it'll just continue reading into adjacent memory where other variables are stored. That's called buffer overflow.
Do you mind showing your RandomString method? |
Код:
stock RandomString(strDest[], strLen = 10)
{
while(strLen--)
{
strDest[strLen] = random(2) ? (random(26) + (random(2) ? 'a' : 'A')) : (random(10) + '0');
}
}
Quote:
|
If string is 72 characters long you need 73 characters. Why?
First of all know that strings in PAWN are no different than an array. Basically those are the same: pawn Код:
#e: Damn internet outage |
Код:
new password[ACCOUNT_MAX_PASSWORD_SIZE], password_hash[128], email[ACCOUNT_MAX_EMAIL_SIZE];
if(sscanf(params, "s["#ACCOUNT_MAX_PASSWORD_SIZE"]s["#ACCOUNT_MAX_EMAIL_SIZE"]", password, email))
{
SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /register [pass] [email]");
return 1;
}


