我有以下文件夹结构:
└── MyProj
├── Dangerous_Memcopy
│ ├── Config.qll
│ └── ...
├── MemMangementLibraries
│ ├── FFmpegMemory
│ └── ...
这是开头Config.qll
:
import cpp
import Utils
// Change here the memory library if wrappers exists in project
import MemMangementLibraries.FFmpegMemory
import semmle.code.cpp.dataflow.TaintTracking
class MyConfig extends TaintTracking::Configuration{
MyConfig() {this = "MyConfig"}
override predicate isSource(DataFlow::Node node){
exists(
CallAllocationExpr alloc_foo |
(
node.asExpr() = alloc_foo
and not alloc_foo.getFile().toString().matches("%mem.c%")
)
)
}
...
我在四行有一个错误import MemMangementLibraries.FFmpegMemory
::
无法解析模块 MemMangementLibraries.FFmpegMemory
我不明白为什么。我使用库名称后的文件夹名称进行了导入:
import MemMangementLibraries.FFmpegMemory
知道可能是什么问题吗?
如果我将库移动FFmpegMemory.qll
到文件夹下Dangerous_Memcopy
并将第四行更改Config.qll
为import FFmpegMemory
,它将接受它。
它似乎无法识别MemMangementLibraries
导入中使用的文件夹。