Skip to content

Commit 444259a

Browse files
committed
CPP: Back out support for 'SysAllocString', as PointsTo doesn't support the free(pointer-to-pointer) pattern in 'SysReAllocString' leading to unaccaptable FPs.
1 parent fbe584f commit 444259a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

cpp/ql/src/semmle/code/cpp/commons/Alloc.qll

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ predicate allocationFunction(Function f)
4848
name = "HeapReAlloc" or
4949
name = "VirtualAlloc" or
5050
name = "CoTaskMemAlloc" or
51-
name = "CoTaskMemRealloc" or
52-
name = "SysAllocString" or
53-
name = "SysAllocStringByteLen" or
54-
name = "SysAllocStringLen"
51+
name = "CoTaskMemRealloc"
5552
)
5653
)
5754
}
@@ -103,8 +100,7 @@ predicate freeFunction(Function f, int argNum)
103100
(name = "LocalReAlloc" and argNum = 0) or
104101
(name = "GlobalReAlloc" and argNum = 0) or
105102
(name = "HeapReAlloc" and argNum = 2) or
106-
(name = "CoTaskMemRealloc" and argNum = 0) or
107-
(name = "SysReAllocString" and argNum = 0)
103+
(name = "CoTaskMemRealloc" and argNum = 0)
108104
)
109105
)
110106
}

0 commit comments

Comments
 (0)