mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
m_challenge: fix use of undefined behaviour.
GCC does what we expect, but other compilers could do just about anything.
This commit is contained in:
parent
f4b52a0ad3
commit
6493f05d8c
1 changed files with 2 additions and 1 deletions
|
@ -143,7 +143,8 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch
|
|||
return 0;
|
||||
}
|
||||
|
||||
b_response = rb_base64_decode((const unsigned char *)++parv[1], strlen(parv[1]), &len);
|
||||
parv[1]++;
|
||||
b_response = rb_base64_decode((const unsigned char *)parv[1], strlen(parv[1]), &len);
|
||||
|
||||
if(len != SHA_DIGEST_LENGTH ||
|
||||
memcmp(source_p->localClient->challenge, b_response, SHA_DIGEST_LENGTH))
|
||||
|
|
Loading…
Reference in a new issue