]> git.ipfire.org Git - thirdparty/openvpn.git/commit
tapctl: Resolve MSVC C4996 warnings
authorSimon Rozman <simon@rozman.si>
Mon, 22 Mar 2021 07:43:59 +0000 (08:43 +0100)
committerGert Doering <gert@greenie.muc.de>
Thu, 17 Mar 2022 13:24:26 +0000 (14:24 +0100)
commit64547d552dbcadd826a30a4ba122d590d87504f6
tree201499b4afca06281bc34730defd3a569cd47fd3
parent4bf8f1147dc7aadce2b15b84bb4613d965660191
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>
(cherry picked from commit e5e9a07e8baee4065b7dfd65736bfa77b8329cfc)
src/tapctl/tap.c