Skip to content

Commit 36a7135

Browse files
committed
C#: Add summary models for the FileStream constructor.
1 parent 504160f commit 36a7135

File tree

1 file changed

+15
-0
lines changed
  • csharp/ql/lib/semmle/code/csharp/frameworks/system

1 file changed

+15
-0
lines changed

csharp/ql/lib/semmle/code/csharp/frameworks/system/IO.qll

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,21 @@ private class SystemIOFileStreamSourceModelCsv extends SourceModelCsv {
201201
}
202202
}
203203

204+
/** Data flow for `System.IO.FileStream`. */
205+
private class SystemIOFileStreamSummaryModelCsv extends SummaryModelCsv {
206+
override predicate row(string row) {
207+
row =
208+
[
209+
"System.IO;FileStream;false;FileStream;(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,System.Int32,System.IO.FileOptions);;Argument[0];Argument[Qualifier];taint;manual",
210+
"System.IO;FileStream;false;FileStream;(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,System.Int32);;Argument[0];Argument[Qualifier];taint;manual",
211+
"System.IO;FileStream;false;FileStream;(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare);;Argument[0];Argument[Qualifier];taint;manual",
212+
"System.IO;FileStream;false;FileStream;(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,System.Int32,System.Boolean);;Argument[0];Argument[Qualifier];taint;manual",
213+
"System.IO;FileStream;false;FileStream;(System.String,System.IO.FileMode,System.IO.FileAccess);;Argument[0];Argument[Qualifier];taint;manual",
214+
"System.IO;FileStream;false;FileStream;(System.String,System.IO.FileMode);;Argument[0];Argument[Qualifier];taint;manual",
215+
]
216+
}
217+
}
218+
204219
/** Data flow for `System.IO.StreamReader`. */
205220
private class SystemIOStreamSummaryModelCsv extends SummaryModelCsv {
206221
override predicate row(string row) {

0 commit comments

Comments
 (0)