]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: quoted_printable_q_decode() - Use explicit type conversion to fix ubsan errors
authorMarco Bettini <marco.bettini@open-xchange.com>
Mon, 12 Jan 2026 15:59:29 +0000 (15:59 +0000)
committerMarco Bettini <marco.bettini@open-xchange.com>
Mon, 19 Jan 2026 08:21:39 +0000 (08:21 +0000)
src/lib-mail/quoted-printable.c

index 9bfbe35ca55d1f64215d5788cef36430ebcda0a9..2bdae5a493b15e145049daba2241d8dae84afb17 100644 (file)
@@ -32,8 +32,8 @@ int quoted_printable_q_decode(const unsigned char *src, size_t src_size,
                        break;
 
                /* =<hex> */
-               hexbuf[0] = src[src_pos+1];
-               hexbuf[1] = src[src_pos+2];
+               hexbuf[0] = (char) src[src_pos+1];
+               hexbuf[1] = (char) src[src_pos+2];
 
                if (hex_to_binary(hexbuf, dest) == 0) {
                        src_pos += 2;