Skip to content

Commit d5be11b

Browse files
committed
C++: Address review comments.
1 parent 9faa825 commit d5be11b

File tree

1 file changed

+4
-4
lines changed
  • cpp/ql/src/Security/CWE/CWE-611

1 file changed

+4
-4
lines changed

cpp/ql/src/Security/CWE/CWE-611/XXE.ql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ class Libxml2ParseCall extends FunctionCall {
196196

197197
Libxml2ParseCall() {
198198
exists(string fname | this.getTarget().getName() = fname |
199-
fname = ["xmlCtxtUseOptions"] and optionsArg = 1
199+
fname = "xmlCtxtUseOptions" and optionsArg = 1
200200
or
201-
fname = ["xmlReadFile"] and optionsArg = 2
201+
fname = "xmlReadFile" and optionsArg = 2
202202
or
203203
fname = ["xmlCtxtReadFile", "xmlParseInNodeContext", "xmlReadDoc", "xmlReadFd"] and
204204
optionsArg = 3
@@ -207,7 +207,7 @@ class Libxml2ParseCall extends FunctionCall {
207207
or
208208
fname = ["xmlCtxtReadMemory", "xmlReadIO"] and optionsArg = 5
209209
or
210-
fname = ["xmlCtxtReadIO"] and optionsArg = 6
210+
fname = "xmlCtxtReadIO" and optionsArg = 6
211211
)
212212
}
213213

@@ -221,7 +221,7 @@ class Libxml2ParseCall extends FunctionCall {
221221
* An `xmlParserOption` for `libxml2` that is considered unsafe.
222222
*/
223223
class Libxml2BadOption extends EnumConstant {
224-
Libxml2BadOption() { this.getName().matches(["XML_PARSE_NOENT", "XML_PARSE_DTDLOAD"]) }
224+
Libxml2BadOption() { this.getName() = ["XML_PARSE_NOENT", "XML_PARSE_DTDLOAD"] }
225225
}
226226

227227
/**

0 commit comments

Comments
 (0)