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
01a8417f75
commit
d9c2579647
|
@ -142,7 +142,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 New Issue