malloc.prop
来自「C程序漏洞检查!」· PROP 代码 · 共 32 行
PROP
32 行
voiduno_check(void){ if (select("malloc", FCALL, NONE)) /* unmarked symbols of type function call */ { if (select("", DEF, NONE)) /* unmarked symbols DEFined in those stmnts */ { if (match(1, DEF, NONE)) /* are there matching symbols with mark 1? */ error("malloc follows malloc"); else mark(1); /* mark 1 */ } else error("result of malloc unused"); } else if (select("free", FCALL, NONE)) { if (select("", USE, NONE)) { if (match(1, DEF, NONE)) unmark(); /* remove mark */ else error("free without malloc"); } else error("no argument to free"); } if (path_ends()) { if (marked(1, ANY, NONE)) { if (known_zero()) no_error(); else error("malloc without free"); } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?