From 8df40d55063f77ce6c84d60694ec8f701094e959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Mon, 15 Nov 2021 19:12:19 +0100 Subject: [PATCH] Fix lib[std]c++ dependency by initialising helper path explicitly --- src/fd.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/fd.cpp b/src/fd.cpp index 114cbc5..295f8ba 100644 --- a/src/fd.cpp +++ b/src/fd.cpp @@ -213,12 +213,14 @@ static int get_key_material_raw(const char * whom, bool again, bool newkey, uint } static int get_key_material_dispatch(const char * whom, bool again, bool newkey, uint8_t *& buf, size_t & len_out) { - static const char * helper = getenv("TZPFMS_PASSPHRASE_HELPER"); + static const char * helper{}; + if(!helper) + helper = getenv("TZPFMS_PASSPHRASE_HELPER"); if(helper && *helper) { if(auto err = get_key_material_helper(helper, whom, again, newkey, buf, len_out); err != -1) return err; else - helper = nullptr; + helper = ""; } return get_key_material_raw(whom, again, newkey, buf, len_out); }