mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-14 05:41:02 +00:00
replace strcpy with memmove in D_MD5PasswordPass()
This commit is contained in:
parent
d9aa430817
commit
3aea4a7601
1 changed files with 6 additions and 4 deletions
|
@ -2598,11 +2598,13 @@ static void D_MD5PasswordPass(const UINT8 *buffer, size_t len, const char *salt,
|
||||||
memset(dest, 0, 16);
|
memset(dest, 0, 16);
|
||||||
#else
|
#else
|
||||||
XBOXSTATIC char tmpbuf[256];
|
XBOXSTATIC char tmpbuf[256];
|
||||||
|
const size_t sl = strlen(salt)
|
||||||
|
|
||||||
if (len > 256-strlen(salt))
|
if (len > 256-sl)
|
||||||
len = 256-strlen(salt);
|
len = 256-s;;
|
||||||
memmove(tmpbuf, buffer, len);
|
memcpy(tmpbuf, buffer, len);
|
||||||
strcpy(&tmpbuf[len], salt);
|
memmove(&tmpbuf[len], salt, sl);
|
||||||
|
//strcpy(&tmpbuf[len], salt);
|
||||||
len += strlen(salt);
|
len += strlen(salt);
|
||||||
if (len < 256)
|
if (len < 256)
|
||||||
memset(&tmpbuf[len],0,256-len);
|
memset(&tmpbuf[len],0,256-len);
|
||||||
|
|
Loading…
Reference in a new issue