]> git.ipfire.org Git - thirdparty/openvpn.git/commit
sample-plugins: Fix memleak in client-connect example plugin
authorFrank Lichtenheld <frank@lichtenheld.com>
Tue, 16 May 2023 09:35:34 +0000 (11:35 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 16 May 2023 10:18:32 +0000 (12:18 +0200)
commit2d36678a2be15f7c00a44354ab71e4521ee3a4f3
treeec5d239429b9afae7fb8e1c27bac64944ba61a72
parentb5cf76cbdc0d7ef2817b71f4611d99455e2d48ea
sample-plugins: Fix memleak in client-connect example plugin

I was looking for memleaks in the code and found
this one with cppcheck. Only an example, but no
need to leave this bug in it.

Also fix fortify problem in keying-material-exporter-demo
so I can actually test the compilation of the sample
plugins.

v2:
 - remove unneccessary usages of snprintf, replace
   with strncpy.

Change-Id: Ibd1b282afc4a28768be3f165f84ab60ca4d24a9b
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20230516093534.26384-1-frank@lichtenheld.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26668.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
sample/sample-plugins/client-connect/sample-client-connect.c
sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.c