@@ -191,7 +191,7 @@ Each step has a **Solution** that indicates one possible answer. Note that all q
191191 predicate isSource(DataFlow::Node arg) {
192192 exists(FunctionCall call |
193193 arg.asExpr() = call.getArgument(0) and
194- call.hasGlobalOrStdName("free")
194+ call.getTarget(). hasGlobalOrStdName("free")
195195 )
196196 }
197197 ```
@@ -228,7 +228,7 @@ Each step has a **Solution** that indicates one possible answer. Note that all q
228228 predicate isSource(DataFlow::Node arg) {
229229 exists(FunctionCall call |
230230 arg.asDefiningArgument() = call.getArgument(0) and
231- call.hasGlobalOrStdName("free")
231+ call.getTarget(). hasGlobalOrStdName("free")
232232 )
233233 }
234234 ```
@@ -276,12 +276,14 @@ import DataFlow::PathGraph
276276class Config extends DataFlow::Configuration {
277277 Config() { this = "Config: name doesn't matter" }
278278
279+ /* TODO move over solution from Section 1 */
279280 override predicate isSource(DataFlow::Node source) {
280281 exists(/* TODO fill me in from Section 1 */ |
281282 /* TODO fill me in from Section 1 */
282283 )
283284 }
284285
286+ /* TODO move over solution from Section 2 */
285287 override predicate isSink(DataFlow::Node sink) {
286288 /* TODO fill me in from Section 2 **/
287289 }
@@ -292,9 +294,9 @@ where config.hasFlowPath(source, sink)
292294select sink, source, sink, "Memory is $@ and $@, causing a potential vulnerability.", source, "freed here", sink, "used here"
293295```
294296
295- 1 . Fill in the ` isSource ` predicate you wrote for [ Section 1] ( #section1 ) .
297+ 1 . Fill in or move the ` isSource ` predicate you wrote for [ Section 1] ( #section1 ) .
296298
297- 1 . Fill in the ` isSink ` predicate you wrote for [ Section 2] ( #section2 ) .
299+ 1 . Fill in or move the ` isSink ` predicate you wrote for [ Section 2] ( #section2 ) .
298300
2993011 . You can now run the completed query. Use the path explorer in the results view to check the results.
300302
0 commit comments