You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
736 B
34 lines
736 B
/*
|
|
* Copyright (c) 2017-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
package codetoanalyze.java.quandary;
|
|
|
|
import com.facebook.infer.builtins.InferTaint;
|
|
|
|
class Traces {
|
|
void sourceMethod() {
|
|
Obj source = (Obj) InferTaint.inferSecretSource();
|
|
callSameSink(null, source, null, null);
|
|
}
|
|
|
|
void callSameSink(Obj o1, Obj o2, Obj o3, Obj o4) {
|
|
callMySink(o1);
|
|
callMySinkIndirect(o2); // test that we expand this sink in the trace
|
|
callMySink(o3);
|
|
callMySink(o4);
|
|
}
|
|
|
|
void callMySinkIndirect(Obj o) {
|
|
callMySink(o);
|
|
}
|
|
|
|
void callMySink(Obj o) {
|
|
InferTaint.inferSensitiveSink(o);
|
|
}
|
|
|
|
}
|