]> git.ipfire.org Git - thirdparty/openvpn.git/commit
ssl: change return type of calc_control_channel_frame_overhead to size_t
authorFrank Lichtenheld <frank@lichtenheld.com>
Tue, 11 Nov 2025 17:24:31 +0000 (18:24 +0100)
committerGert Doering <gert@greenie.muc.de>
Wed, 12 Nov 2025 15:53:29 +0000 (16:53 +0100)
commit8b0554d988f6bfdefd30620290ec8ff690a37ce2
treec7c79020a319b307c755403c414564fa599de887
parentde82ad64735ac230a8ae7ae31a83164bc60b1fcb
ssl: change return type of calc_control_channel_frame_overhead to size_t

This avoids dealing with conversion warnings inside
the function. Since we only add values that are
supposed to be positive this should be safe.

Note that we now cast the return value to int at
the caller side. There we actually substract it and
want to catch the case where the result gets negative.
Since all the involved values are quite small compared
to INT_MAX I decided to just cast it without further
checks.

Change-Id: I71e9d4a61d37483685723c16e98f59755694cadf
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1297
Message-Id: <20251111172437.7634-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34326.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/ssl.c