]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fix unaligned access in auth-token
authorArne Schwabe <arne@rfc2549.org>
Mon, 30 Jan 2023 17:29:32 +0000 (18:29 +0100)
committerGert Doering <gert@greenie.muc.de>
Wed, 1 Feb 2023 14:07:31 +0000 (15:07 +0100)
commit6241b2f8dbe39062a3273499a0259750d2f02cf8
tree66ba08a3a97d86f917a5fb140411e39bcd57a693
parent680ba43355f6d9e4dcdf6c6eb9ace09946dba8f3
Fix unaligned access in auth-token

The undefined behaviour USAN clang checker found this. The optimiser
of clang/gcc will optimise the memcpy away in the auth_token case and
output excactly the same assembly on amd64/arm64 but it is still better
to not rely on undefined behaviour.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Message-Id: <20230130172936.3444840-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26103.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit f6ccff6d7ea806711f9af59c9de52b7cf80d9c81)
src/openvpn/auth_token.c