]> git.ipfire.org Git - thirdparty/openvpn.git/commit
tapctl: Resolve MSVC C4996 warnings
authorSimon Rozman via Openvpn-devel <openvpn-devel@lists.sourceforge.net>
Mon, 22 Mar 2021 07:43:59 +0000 (08:43 +0100)
committerGert Doering <gert@greenie.muc.de>
Mon, 22 Mar 2021 09:14:36 +0000 (10:14 +0100)
commite5e9a07e8baee4065b7dfd65736bfa77b8329cfc
tree9547273649111adff8dd2a683d3cf971c90faa62
parentc3a7065d5bec0ca4ad479e27c124e74fbd7c2234
tapctl: Resolve MSVC C4996 warnings

wcsncat() was declared unsafe in favour of wcsncat_s(). However, the
string concatenation follows the string length check, making wcsncat()
safe too. Code analysis is just not smart enough (yet) to detect this.

The code was refactored to use wcscat_s() MSVC is considering as "safe".

Signed-off-by: Simon Rozman <simon@rozman.si>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20210322074359.527-1-simon@rozman.si>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21774.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/tapctl/tap.c