Skip to content

Commit

Permalink
Skip obfuscating empty log lines
Browse files Browse the repository at this point in the history
  • Loading branch information
nirbar committed May 28, 2024
1 parent 497d461 commit 42137e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PanelSwCustomActions/ExecOnComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ HRESULT CExecOnComponent::LogProcessOutput(HANDLE hProcess, HANDLE hStdErrOut, L
hr = szLogLine.Format(L"%.*ls", (szLogEnd - (szLog + dwLogStart)), szLog + dwLogStart);
ExitOnFailure(hr, "Failed to format log line");

if (szObfuscateLog && *szObfuscateLog)
if (szObfuscateLog && *szObfuscateLog && szLogLine.StrLen())
{
hr = szLogLine.ReplaceAll(szObfuscateLog, L"******");
ExitOnFailure(hr, "Failed to obfuscate log line");
Expand Down Expand Up @@ -920,7 +920,7 @@ HRESULT CExecOnComponent::LogProcessOutput(HANDLE hProcess, HANDLE hStdErrOut, L
{
CWixString szLogLine(szLog + dwLogStart);

if (szObfuscateLog && *szObfuscateLog)
if (szObfuscateLog && *szObfuscateLog && szLogLine.StrLen())
{
hr = szLogLine.ReplaceAll(szObfuscateLog, L"******");
ExitOnFailure(hr, "Failed to obfuscate log line");
Expand Down

0 comments on commit 42137e6

Please sign in to comment.