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:
Elizabeth Jennifer Myers 2011-02-22 12:00:45 -05:00
parent 01a8417f75
commit d9c2579647
1 changed files with 2 additions and 1 deletions

View File

@ -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))