summaryrefslogtreecommitdiff
path: root/scripts/coccinelle/overflow_muldiv64.cocci
blob: 08ec4a8de0680e156a3e46548b6f0a69b2ef1897 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Find muldiv64(i64, i64, x) for potential overflow
@filter@
typedef uint64_t;
typedef int64_t;
{ uint64_t, int64_t, long, unsigned long } a, b;
expression c;
position p;
@@

muldiv64(a,b,c)@p

@script:python@
p << filter.p;
@@

cocci.print_main("potential muldiv64() overflow", p)