mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
C++: Make sure a CatchBlock that catches a const std::bad_alloc& is also a BadAllocCatchBlock.
This commit is contained in:
@@ -139,7 +139,8 @@ class BadAllocType extends Class {
|
||||
*/
|
||||
class BadAllocCatchBlock extends CatchBlock {
|
||||
BadAllocCatchBlock() {
|
||||
this.getParameter().getUnspecifiedType() = any(BadAllocType badAlloc).getADerivedClass*()
|
||||
this.getParameter().getUnspecifiedType().stripType() =
|
||||
any(BadAllocType badAlloc).getADerivedClass*()
|
||||
or
|
||||
not exists(this.getParameter())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user