Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When path is empty do not replace string #487

Merged
merged 1 commit into from
Sep 13, 2021

Conversation

eddynaka
Copy link
Contributor

This change will fix the following exception:

ArgumentException: String cannot be of zero length. (Parameter 'oldValue')
at System.String.Replace(String oldValue, String newValue)
at Microsoft.CodeAnalysis.IL.Sdk.CompilerDataLogger..ctor(IAnalysisContext analysisContext, IEnumerable`1 targetFileSpecifiers) in D:\a\r1\a\src\BinSkim.Sdk\CompilerDataLogger.cs:line 59
at Microsoft.CodeAnalysis.IL.AnalyzeCommand.CreateContext(AnalyzeOptions options, IAnalysisLogger logger, RuntimeConditions runtimeErrors, PropertiesDictionary policy, String filePath) in D:\a\r1\a\src\BinSkim.Driver\AnalyzeCommand.cs:line 59
at Microsoft.CodeAnalysis.Sarif.Driver.AnalyzeCommandBase`2.DetermineApplicabilityAndAnalyze(TOptions options, IEnumerable`1 skimmers, TContext rootContext, String target, ISet`1 disabledSkimmers)
at Microsoft.CodeAnalysis.Sarif.Driver.AnalyzeCommandBase`2.AnalyzeTargets(TOptions options, IEnumerable`1 skimmers, TContext rootContext, IEnumerable`1 targets)
at Microsoft.CodeAnalysis.Sarif.Driver.AnalyzeCommandBase`2.Analyze(TOptions options, AggregatingLogger logger)
at Microsoft.CodeAnalysis.Sarif.Driver.AnalyzeCommandBase`2.Run(TOptions options

@eddynaka eddynaka merged commit 6e4cd7f into main Sep 13, 2021
@eddynaka eddynaka deleted the users/ednakamu/fixing-replace-when-path-empty branch September 13, 2021 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant