Skip to content

Commit

Permalink
Some more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mavasani committed Nov 16, 2019
1 parent 0339d37 commit 533b93e
Showing 1 changed file with 2 additions and 8 deletions.
Expand Up @@ -37,8 +37,8 @@ internal static class TaintedDataSymbolMapExtensions
[NotNullWhen(returnValue: true)] out PooledHashSet<string>? allTaintedTargets)
{
allTaintedTargets = null;
PointsToAnalysisResult pointsToAnalysisResult = null;
ValueContentAnalysisResult valueContentAnalysisResult = null;
PointsToAnalysisResult? pointsToAnalysisResult = null;
ValueContentAnalysisResult? valueContentAnalysisResult = null;
foreach (SourceInfo sourceInfo in sourceSymbolMap.GetInfosForType(method.ContainingType))
{
foreach ((MethodMatcher methodMatcher, ImmutableHashSet<string> taintedTargets) in sourceInfo.TaintedMethods)
Expand Down Expand Up @@ -67,10 +67,7 @@ internal static class TaintedDataSymbolMapExtensions
IEnumerable<(PointsToCheck, string target)> positivePointsToTaintedTargets = pointsToTaintedTargets.Where(s =>
s.pointsToCheck(
arguments.Select(o =>
// TODO(dotpaul): Remove the below suppression.
#pragma warning disable CS8602 // Dereference of a possibly null reference.
pointsToAnalysisResult[o.Kind, o.Syntax]).ToImmutableArray()));
#pragma warning restore CS8602 // Dereference of a possibly null reference.
if (positivePointsToTaintedTargets.Any())
{
if (allTaintedTargets == null)
Expand All @@ -96,11 +93,8 @@ internal static class TaintedDataSymbolMapExtensions

IEnumerable<(ValueContentCheck, string target)> positiveValueContentTaintedTargets = valueContentTaintedTargets.Where(s =>
s.valueContentCheck(
// TODO(dotpaul): Remove the below suppression.
#pragma warning disable CS8602 // Dereference of a possibly null reference.
arguments.Select(o => pointsToAnalysisResult[o.Kind, o.Syntax]).ToImmutableArray(),
arguments.Select(o => valueContentAnalysisResult[o.Kind, o.Syntax]).ToImmutableArray()));
#pragma warning restore CS8602 // Dereference of a possibly null reference.
if (positiveValueContentTaintedTargets.Any())
{
if (allTaintedTargets == null)
Expand Down

0 comments on commit 533b93e

Please sign in to comment.