From 6493f05d8cb680173570787f9daef52daf192d37 Mon Sep 17 00:00:00 2001 From: Elizabeth Jennifer Myers Date: Tue, 22 Feb 2011 12:00:45 -0500 Subject: [PATCH] m_challenge: fix use of undefined behaviour. GCC does what we expect, but other compilers could do just about anything. --- modules/m_challenge.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/m_challenge.c b/modules/m_challenge.c index 5b56cfe4c..68070df7d 100644 --- a/modules/m_challenge.c +++ b/modules/m_challenge.c @@ -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))