Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #426 from sbatten/nullptr
Browse files Browse the repository at this point in the history
Add guard against null to match remainder of calls in file
  • Loading branch information
sergiou87 authored Nov 10, 2021
2 parents 1248408 + a3de0ec commit 4154995
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/keytar_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ KEYTAR_OP_RESULT FindCredentials(const std::string& service,
std::vector<Credentials>* credentials,
std::string* errStr) {
LPWSTR filter = utf8ToWideChar(service + "*");
if (filter == NULL) {
*errStr = "Error generating credential filter";
return FAIL_ERROR;
}

DWORD count;
CREDENTIAL **creds;
Expand Down

0 comments on commit 4154995

Please sign in to comment.