Skip to content

Commit 2e61062

Browse files
committed
C#: Consider Byte and Char arrays and pointers to be bulk data types in terms of MaD.
1 parent 4b0c725 commit 2e61062

File tree

4 files changed

+97
-97
lines changed

4 files changed

+97
-97
lines changed

csharp/ql/lib/ext/System.IO.model.yml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ extensions:
4747
- ["System.IO", "FileStream", False, "FileStream", "(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,System.Int32)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
4848
- ["System.IO", "FileStream", False, "FileStream", "(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,System.Int32,System.Boolean)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
4949
- ["System.IO", "FileStream", False, "FileStream", "(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,System.Int32,System.IO.FileOptions)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
50-
- ["System.IO", "MemoryStream", False, "MemoryStream", "(System.Byte[])", "", "Argument[0].Element", "Argument[this]", "taint", "manual"]
51-
- ["System.IO", "MemoryStream", False, "MemoryStream", "(System.Byte[],System.Boolean)", "", "Argument[0].Element", "Argument[this]", "taint", "manual"]
52-
- ["System.IO", "MemoryStream", False, "MemoryStream", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[0].Element", "Argument[this]", "taint", "manual"]
53-
- ["System.IO", "MemoryStream", False, "MemoryStream", "(System.Byte[],System.Int32,System.Int32,System.Boolean)", "", "Argument[0].Element", "Argument[this]", "taint", "manual"]
54-
- ["System.IO", "MemoryStream", False, "MemoryStream", "(System.Byte[],System.Int32,System.Int32,System.Boolean,System.Boolean)", "", "Argument[0].Element", "Argument[this]", "taint", "manual"]
50+
- ["System.IO", "MemoryStream", False, "MemoryStream", "(System.Byte[])", "", "Argument[0]", "Argument[this]", "taint", "manual"]
51+
- ["System.IO", "MemoryStream", False, "MemoryStream", "(System.Byte[],System.Boolean)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
52+
- ["System.IO", "MemoryStream", False, "MemoryStream", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
53+
- ["System.IO", "MemoryStream", False, "MemoryStream", "(System.Byte[],System.Int32,System.Int32,System.Boolean)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
54+
- ["System.IO", "MemoryStream", False, "MemoryStream", "(System.Byte[],System.Int32,System.Int32,System.Boolean,System.Boolean)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
5555
- ["System.IO", "MemoryStream", False, "ToArray", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
5656
- ["System.IO", "Path", False, "Combine", "(System.String,System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
5757
- ["System.IO", "Path", False, "Combine", "(System.String,System.String)", "", "Argument[1]", "ReturnValue", "taint", "manual"]
@@ -64,42 +64,42 @@ extensions:
6464
- ["System.IO", "Path", False, "Combine", "(System.String,System.String,System.String,System.String)", "", "Argument[3]", "ReturnValue", "taint", "manual"]
6565
- ["System.IO", "Path", False, "Combine", "(System.String[])", "", "Argument[0].Element", "ReturnValue", "taint", "manual"]
6666
- ["System.IO", "Path", False, "Combine", "(System.ReadOnlySpan<System.String>)", "", "Argument[0].Element", "ReturnValue", "taint", "manual"]
67-
- ["System.IO", "Path", False, "GetDirectoryName", "(System.ReadOnlySpan<System.Char>)", "", "Argument[0].Element", "ReturnValue", "taint", "manual"]
67+
- ["System.IO", "Path", False, "GetDirectoryName", "(System.ReadOnlySpan<System.Char>)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
6868
- ["System.IO", "Path", False, "GetDirectoryName", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
69-
- ["System.IO", "Path", False, "GetExtension", "(System.ReadOnlySpan<System.Char>)", "", "Argument[0].Element", "ReturnValue", "taint", "manual"]
69+
- ["System.IO", "Path", False, "GetExtension", "(System.ReadOnlySpan<System.Char>)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
7070
- ["System.IO", "Path", False, "GetExtension", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
71-
- ["System.IO", "Path", False, "GetFileName", "(System.ReadOnlySpan<System.Char>)", "", "Argument[0].Element", "ReturnValue", "taint", "manual"]
71+
- ["System.IO", "Path", False, "GetFileName", "(System.ReadOnlySpan<System.Char>)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
7272
- ["System.IO", "Path", False, "GetFileName", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
73-
- ["System.IO", "Path", False, "GetFileNameWithoutExtension", "(System.ReadOnlySpan<System.Char>)", "", "Argument[0].Element", "ReturnValue", "taint", "manual"]
73+
- ["System.IO", "Path", False, "GetFileNameWithoutExtension", "(System.ReadOnlySpan<System.Char>)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
7474
- ["System.IO", "Path", False, "GetFileNameWithoutExtension", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
7575
- ["System.IO", "Path", False, "GetFullPath", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
7676
- ["System.IO", "Path", False, "GetFullPath", "(System.String,System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
77-
- ["System.IO", "Path", False, "GetPathRoot", "(System.ReadOnlySpan<System.Char>)", "", "Argument[0].Element", "ReturnValue", "taint", "manual"]
77+
- ["System.IO", "Path", False, "GetPathRoot", "(System.ReadOnlySpan<System.Char>)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
7878
- ["System.IO", "Path", False, "GetPathRoot", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
7979
- ["System.IO", "Path", False, "GetRelativePath", "(System.String,System.String)", "", "Argument[1]", "ReturnValue", "taint", "manual"]
80-
- ["System.IO", "Stream", True, "BeginRead", "(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
81-
- ["System.IO", "Stream", True, "BeginWrite", "(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)", "", "Argument[0].Element", "Argument[this]", "taint", "manual"]
80+
- ["System.IO", "Stream", True, "BeginRead", "(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
81+
- ["System.IO", "Stream", True, "BeginWrite", "(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
8282
- ["System.IO", "Stream", False, "CopyTo", "(System.IO.Stream)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
8383
- ["System.IO", "Stream", True, "CopyTo", "(System.IO.Stream,System.Int32)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
8484
- ["System.IO", "Stream", False, "CopyToAsync", "(System.IO.Stream)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
8585
- ["System.IO", "Stream", False, "CopyToAsync", "(System.IO.Stream,System.Int32)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
8686
- ["System.IO", "Stream", True, "CopyToAsync", "(System.IO.Stream,System.Int32,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
8787
- ["System.IO", "Stream", False, "CopyToAsync", "(System.IO.Stream,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
88-
- ["System.IO", "Stream", True, "Read", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
89-
- ["System.IO", "Stream", True, "Read", "(System.Span<System.Byte>)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
90-
- ["System.IO", "Stream", False, "ReadAsync", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
91-
- ["System.IO", "Stream", True, "ReadAsync", "(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
88+
- ["System.IO", "Stream", True, "Read", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
89+
- ["System.IO", "Stream", True, "Read", "(System.Span<System.Byte>)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
90+
- ["System.IO", "Stream", False, "ReadAsync", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
91+
- ["System.IO", "Stream", True, "ReadAsync", "(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
9292
# Post-update nodes for `Memory<T>` are currently unsupported. This model is provided for completeness
93-
- ["System.IO", "Stream", True, "ReadAsync", "(System.Memory<System.Byte>,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
94-
- ["System.IO", "Stream", True, "ReadAtLeast", "(System.Span<System.Byte>,System.Int32,System.Boolean)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
93+
- ["System.IO", "Stream", True, "ReadAsync", "(System.Memory<System.Byte>,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
94+
- ["System.IO", "Stream", True, "ReadAtLeast", "(System.Span<System.Byte>,System.Int32,System.Boolean)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
9595
# Post-update nodes for `Memory<T>` are currently unsupported. This model is provided for completeness
9696
- ["System.IO", "Stream", True, "ReadAtLeastAsync", "(System.Memory<System.Byte>,System.Int32,System.Boolean,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
97-
- ["System.IO", "Stream", True, "ReadExactly", "(System.Span<System.Byte>)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
98-
- ["System.IO", "Stream", True, "ReadExactly", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
99-
- ["System.IO", "Stream", True, "Write", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[0].Element", "Argument[this]", "taint", "manual"]
100-
- ["System.IO", "Stream", True, "Write", "(System.ReadOnlySpan<System.Byte>)", "", "Argument[0].Element", "Argument[this]", "taint", "manual"]
101-
- ["System.IO", "Stream", False, "WriteAsync", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[0].Element", "Argument[this]", "taint", "manual"]
102-
- ["System.IO", "Stream", True, "WriteAsync", "(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)", "", "Argument[0].Element", "Argument[this]", "taint", "manual"]
97+
- ["System.IO", "Stream", True, "ReadExactly", "(System.Span<System.Byte>)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
98+
- ["System.IO", "Stream", True, "ReadExactly", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
99+
- ["System.IO", "Stream", True, "Write", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
100+
- ["System.IO", "Stream", True, "Write", "(System.ReadOnlySpan<System.Byte>)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
101+
- ["System.IO", "Stream", False, "WriteAsync", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
102+
- ["System.IO", "Stream", True, "WriteAsync", "(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
103103
- ["System.IO", "StreamReader", False, "StreamReader", "(System.IO.Stream)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
104104
- ["System.IO", "StreamReader", False, "StreamReader", "(System.IO.Stream,System.Boolean)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
105105
- ["System.IO", "StreamReader", False, "StreamReader", "(System.IO.Stream,System.Text.Encoding)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
@@ -117,27 +117,27 @@ extensions:
117117
- ["System.IO", "StringWriter", True, "GetStringBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
118118
- ["System.IO", "StringWriter", False, "StringWriter", "(System.Text.StringBuilder,System.IFormatProvider)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
119119
- ["System.IO", "StringWriter", False, "ToString", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
120-
- ["System.IO", "StringWriter", True, "Write", "(System.Char[],System.Int32,System.Int32)", "", "Argument[0].Element", "Argument[this]", "taint", "manual"]
120+
- ["System.IO", "StringWriter", True, "Write", "(System.Char[],System.Int32,System.Int32)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
121121
- ["System.IO", "StringWriter", True, "Write", "(System.String)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
122122
- ["System.IO", "StringWriter", True, "Write", "(System.Text.StringBuilder)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
123-
- ["System.IO", "StringWriter", True, "WriteAsync", "(System.Char[],System.Int32,System.Int32)", "", "Argument[0].Element", "Argument[this]", "taint", "manual"]
123+
- ["System.IO", "StringWriter", True, "WriteAsync", "(System.Char[],System.Int32,System.Int32)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
124124
- ["System.IO", "StringWriter", True, "WriteAsync", "(System.String)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
125125
- ["System.IO", "StringWriter", True, "WriteAsync", "(System.Text.StringBuilder,System.Threading.CancellationToken)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
126126
- ["System.IO", "StringWriter", True, "WriteLine", "(System.Text.StringBuilder)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
127-
- ["System.IO", "StringWriter", True, "WriteLineAsync", "(System.Char[],System.Int32,System.Int32)", "", "Argument[0].Element", "Argument[this]", "taint", "manual"]
127+
- ["System.IO", "StringWriter", True, "WriteLineAsync", "(System.Char[],System.Int32,System.Int32)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
128128
- ["System.IO", "StringWriter", True, "WriteLineAsync", "(System.String)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
129129
- ["System.IO", "StringWriter", True, "WriteLineAsync", "(System.Text.StringBuilder,System.Threading.CancellationToken)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
130130
- ["System.IO", "TextReader", True, "Read", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
131-
- ["System.IO", "TextReader", True, "Read", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
132-
- ["System.IO", "TextReader", True, "Read", "(System.Span<System.Char>)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
133-
- ["System.IO", "TextReader", True, "ReadAsync", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
131+
- ["System.IO", "TextReader", True, "Read", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
132+
- ["System.IO", "TextReader", True, "Read", "(System.Span<System.Char>)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
133+
- ["System.IO", "TextReader", True, "ReadAsync", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
134134
# Post-update nodes for `Memory<T>` are currently unsupported. This model is provided for completeness
135-
- ["System.IO", "TextReader", True, "ReadAsync", "(System.Memory<System.Char>,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
136-
- ["System.IO", "TextReader", True, "ReadBlock", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
137-
- ["System.IO", "TextReader", True, "ReadBlock", "(System.Span<System.Char>)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
138-
- ["System.IO", "TextReader", True, "ReadBlockAsync", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
135+
- ["System.IO", "TextReader", True, "ReadAsync", "(System.Memory<System.Char>,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
136+
- ["System.IO", "TextReader", True, "ReadBlock", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
137+
- ["System.IO", "TextReader", True, "ReadBlock", "(System.Span<System.Char>)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
138+
- ["System.IO", "TextReader", True, "ReadBlockAsync", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
139139
# Post-update nodes for `Memory<T>` are currently unsupported. This model is provided for completeness
140-
- ["System.IO", "TextReader", True, "ReadBlockAsync", "(System.Memory<System.Char>,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
140+
- ["System.IO", "TextReader", True, "ReadBlockAsync", "(System.Memory<System.Char>,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
141141
- ["System.IO", "TextReader", True, "ReadLine", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
142142
- ["System.IO", "TextReader", True, "ReadLineAsync", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
143143
- ["System.IO", "TextReader", True, "ReadToEnd", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]

0 commit comments

Comments
 (0)