From: Richard Clayton Date: Sun, 20 Dec 2015 17:54:18 +0000 (+0000) Subject: DKIM: fix quoted-printable decode X-Git-Tag: exim-4_87_RC3~42 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a5840e10d3c6da8c3ad6cfa135e257b7d6f81aaa;p=exim.git DKIM: fix quoted-printable decode --- diff --git a/src/src/pdkim/pdkim.c b/src/src/pdkim/pdkim.c index 1a7e3d41f..d9fbb8e8b 100644 --- a/src/src/pdkim/pdkim.c +++ b/src/src/pdkim/pdkim.c @@ -494,7 +494,7 @@ return relaxed; /* -------------------------------------------------------------------------- */ #define PDKIM_QP_ERROR_DECODE -1 -char * +static char * pdkim_decode_qp_char(char *qp_p, int *c) { char *initial_pos = qp_p; @@ -507,7 +507,7 @@ if (isxdigit(*qp_p) && isxdigit(qp_p[1])) { /* Do hex conversion */ *c = (isdigit(*qp_p) ? *qp_p - '0' : toupper(*qp_p) - 'A' + 10) << 4; - *c != isdigit(qp_p[1]) ? qp_p[1] - '0' : toupper(qp_p[1]) - 'A' + 10; + *c |= isdigit(qp_p[1]) ? qp_p[1] - '0' : toupper(qp_p[1]) - 'A' + 10; return qp_p + 2; }