]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Use constrain_int() instead of MIN()+syshead.c compat definition - v2.
authorGert Doering <gert@greenie.muc.de>
Mon, 6 May 2013 07:55:41 +0000 (09:55 +0200)
committerDavid Sommerseth <davids@redhat.com>
Tue, 7 May 2013 09:44:24 +0000 (11:44 +0200)
commitbd25aa66b76b82f335abbb7377c278a44da194ac
tree59798f8f031f4e8a56f5589a122aaaacbd30dfe9
parent31e5f34f3c6cf3aa6f120d22c415ac74a5ba1639
Use constrain_int() instead of MIN()+syshead.c compat definition - v2.

Reverts commit 15ca5c297b556fbb, instead change ssl_openssl.c to use
"constrain_int()", which already exists in "integer.h".

Using this instead of min_int() ensures that the result is always bounded
to 0...256 even in the case of a potential MAX_INT overflow.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: David Sommerseth <davids@redhat.com>
Message-Id: 1367826941-22412-1-git-send-email-gert@greenie.muc.de
URL: http://article.gmane.org/gmane.network.openvpn.devel/7586
Signed-off-by: David Sommerseth <davids@redhat.com>
src/openvpn/ssl_openssl.c
src/openvpn/syshead.h