]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fix binary and (&) used in auth-token check instead of logical and (&&)
authorArne Schwabe <arne@rfc2549.org>
Wed, 31 Mar 2021 15:55:08 +0000 (17:55 +0200)
committerGert Doering <gert@greenie.muc.de>
Mon, 3 May 2021 13:53:29 +0000 (15:53 +0200)
commit0cbfa10e6aac01831bebe42ab33dc56c4704c1a6
tree7f5d075cce2b63724f2f2704d60c288c8227a22d
parent4a35d38efa74becf99ae9c6711f5c10c4b60f84b
Fix binary and (&) used in auth-token check instead of logical and (&&)

AUTH_TOKEN_HMAC_OK is 1, so the first term is always 0/1 and the bool
from the second part is also 0/1, so the & does the same in this instance
as &&.

In this specific case & instead && does not change behaviour but using
&& is the intended semantic behaviour.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20210331155508.19423-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21911.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/auth_token.c