Skip to content

Commit 0fcfe57

Browse files
rdmarsh2MathiasVP
authored andcommitted
C++: query-specific model for ffmpeg allocator
1 parent 61017a7 commit 0fcfe57

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cpp/ql/src/experimental/Likely Bugs/ArrayAccessProductFlow.ql

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ import semmle.code.cpp.valuenumbering.GlobalValueNumbering
88
import semmle.code.cpp.models.interfaces.Allocation
99
import semmle.code.cpp.ir.IRConfiguration
1010

11+
// temporary - custom allocator for ffmpeg
12+
class AvBufferAlloc extends AllocationFunction {
13+
AvBufferAlloc() { this.hasGlobalName(["av_mallocz", "av_malloc"]) }
14+
15+
override int getSizeArg() { result = 0 }
16+
}
17+
1118
predicate bounded(Instruction i, Bound b, int delta, boolean upper) {
1219
// TODO: reason
1320
semBounded(getSemanticExpr(i), b, delta, upper, _)

0 commit comments

Comments
 (0)