From a5840e10d3c6da8c3ad6cfa135e257b7d6f81aaa Mon Sep 17 00:00:00 2001 From: Richard Clayton Date: Sun, 20 Dec 2015 17:54:18 +0000 Subject: [PATCH] DKIM: fix quoted-printable decode --- src/src/pdkim/pdkim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.25.1