From d277f1303c191f6a63f5c788d736710ec2ab58ff Mon Sep 17 00:00:00 2001 From: fpetrini15 Date: Fri, 18 Oct 2024 15:21:28 -0700 Subject: [PATCH] Add new error case --- src/shared_library.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/shared_library.cc b/src/shared_library.cc index 4df9794bf..6fc237f6a 100644 --- a/src/shared_library.cc +++ b/src/shared_library.cc @@ -249,6 +249,13 @@ SharedLibrary::AddAdditionalDependencyDir( #ifdef _WIN32 const std::wstring PATH(L"Path"); + if (additional_path.back() != ';') { + return Status( + Status::Code::INVALID_ARG, + "backend config parameter \"additional-dependency-dirs\" is malformed. " + "Each additional path provided should terminate with a ';'."); + } + DWORD len = GetEnvironmentVariableW(PATH.c_str(), NULL, 0); if (len > 0) { original_path.resize(len);