From 6bacf6e1db975e5738821bf4abe20314f5e38283 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 14 Aug 2019 18:25:16 +0100 Subject: [PATCH] Fix crash on jack_internal_client_load without some options set --- common/JackRequest.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/JackRequest.h b/common/JackRequest.h index 2025bdc3..a1ede642 100644 --- a/common/JackRequest.h +++ b/common/JackRequest.h @@ -1063,8 +1063,12 @@ struct JackInternalClientLoadRequest : public JackRequest memset(fDllName, 0, sizeof(fDllName)); memset(fLoadInitName, 0, sizeof(fLoadInitName)); strncpy(fName, client_name, sizeof(fName)-1); - strncpy(fDllName, so_name, sizeof(fDllName)-1); - strncpy(fLoadInitName, objet_data, sizeof(fLoadInitName)-1); + if (so_name) { + strncpy(fDllName, so_name, sizeof(fDllName)-1); + } + if (objet_data) { + strncpy(fLoadInitName, objet_data, sizeof(fLoadInitName)-1); + } } int Read(detail::JackChannelTransactionInterface* trans) -- 2.11.4.GIT