forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathE.java
More file actions
32 lines (24 loc) · 628 Bytes
/
Copy pathE.java
File metadata and controls
32 lines (24 loc) · 628 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
public class E {
static Object src() { return new Object(); }
static void sink(Object obj) {}
static class Buffer { Object content; }
static class BufHolder { Buffer buf; }
static class Packet { BufHolder data; }
static void recv(Buffer buf) {
buf.content = src();
}
static void foo(Buffer raw, BufHolder bh, Packet p) {
recv(raw);
recv(bh.buf);
recv(p.data.buf);
sink(raw.content);
BufHolder bh2 = bh;
sink(bh2.buf.content);
Packet p2 = p;
sink(p2.data.buf.content);
handlepacket(p);
}
static void handlepacket(Packet p) {
sink(p.data.buf.content);
}
}