From 337dbc392253af92b0577da062a5abc1d032b1ef Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 10 Jan 2023 14:30:37 +0100 Subject: Return std::string instead of dynamic allocations We mostly use classical C strings, but the memory management around them can get confusing and error prone. Let's use std::string for the cases where we need to return a newly allocated string. --- win/vncconfig/Authentication.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'win/vncconfig/Authentication.h') diff --git a/win/vncconfig/Authentication.h b/win/vncconfig/Authentication.h index 6789a4f2..cc162077 100644 --- a/win/vncconfig/Authentication.h +++ b/win/vncconfig/Authentication.h @@ -93,8 +93,8 @@ namespace rfb { #ifdef HAVE_GNUTLS if (isItemChecked(IDC_ENC_X509)) { - SSecurityTLS::X509_CertFile.setParam(regKey.getString("X509Cert")); - SSecurityTLS::X509_CertFile.setParam(regKey.getString("X509Key")); + SSecurityTLS::X509_CertFile.setParam(regKey.getString("X509Cert").c_str()); + SSecurityTLS::X509_CertFile.setParam(regKey.getString("X509Key").c_str()); } #endif -- cgit v1.2.3