-
Notifications
You must be signed in to change notification settings - Fork 471
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
Fix the bug occurring when element type of array is not INamedType. #2730
Fix the bug occurring when element type of array is not INamedType. #2730
Conversation
I thought the assert was firing for params arrays. Were you able to repro against the roslyn-analysis repo? |
} | ||
}"); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that I'm super worried about someone putting a hardcoded key in a params byte[] array, but would we treat the params array as a tainted source if someone called MethodWithArrayParameters<byte>(1, 2, 3)
? If it's easy to handle, I think we should since that would count as a constant byte array. If it's not easy to handle, we should at least put a comment somewhere that SourceInfo.TaintConstantArray doesn't handle params arrays.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This case can be handled. At the point of the invocation of MethodWithArrayParameters(1, 2, 3), it will trigger the callback of OperationKind.ArrayInitializer. A test case will be added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Will wait on @dotpaul's review though...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
No description provided.