Пример #1
0
  public void constantFieldArrayTest() {
    String tainted = TelephonyManager.getDeviceId();
    staticArray[0] = tainted;
    fieldArray[0] = tainted;

    ConnectionManager cm = new ConnectionManager();
    cm.publish(staticArray[0]);
    cm.publish(fieldArray[0]);
  }
Пример #2
0
 public void constantExceptionTest1() {
   try {
     String secret = getSecretAndThrow();
     ConnectionManager cm = new ConnectionManager();
     cm.publish(secret);
   } catch (MyException ex) {
     ConnectionManager cm = new ConnectionManager();
     cm.publish(ex + TelephonyManager.getDeviceId());
   }
 }
Пример #3
0
 private void leakIfGreaterThan(int i, int j) {
   if (i > j) {
     String tainted = TelephonyManager.getDeviceId();
     ConnectionManager cm = new ConnectionManager();
     cm.publish(tainted);
   }
 }
Пример #4
0
 public void fpConstIntraproceduralTest1() {
   int i = 3;
   if (i > 5) {
     String tainted = TelephonyManager.getDeviceId();
     ConnectionManager cm = new ConnectionManager();
     cm.publish(tainted);
   }
 }
Пример #5
0
 public void allocSiteTest1() {
   String tainted = TelephonyManager.getDeviceId();
   int i = 3;
   Base obj = i > 10 ? new A() : new B();
   String copy = obj.transform(tainted);
   ConnectionManager cm = new ConnectionManager();
   cm.publish(copy);
 }
Пример #6
0
 private void leakRecursive(int i) {
   if (i > 0) {
     String tainted = TelephonyManager.getDeviceId();
     ConnectionManager cm = new ConnectionManager();
     cm.publish(tainted);
     return;
   }
   leakRecursive(0);
 }
Пример #7
0
  public void concreteWriteReadTest() {
    String tainted = TelephonyManager.getDeviceId();
    SynchronousQueue<String> q = new SynchronousQueue<String>();
    q.add(tainted);
    // not implemented for SynchronousQueue: q.element();
    String taintedElement3 = q.poll();

    ConnectionManager cm = new ConnectionManager();
    cm.publish(taintedElement3);
  }
Пример #8
0
 public void concreteWriteReadNegativeTest() {
   String tainted = TelephonyManager.getDeviceId();
   String untainted = "Hello world!";
   SynchronousQueue<String> q = new SynchronousQueue<String>();
   SynchronousQueue<String> p = new SynchronousQueue<String>();
   q.add(tainted);
   p.add(untainted);
   String taintedElement = q.poll();
   String untaintedElement = p.poll();
   taintedElement.toString();
   ConnectionManager cm = new ConnectionManager();
   cm.publish(untaintedElement);
 }
Пример #9
0
 public void send() {
   ConnectionManager cm = new ConnectionManager();
   cm.publish(field);
 }
Пример #10
0
 public void constantFieldTest() {
   ConstantClass c = new ConstantClass();
   ConnectionManager cm = new ConnectionManager();
   cm.publish(c.e);
 }
Пример #11
0
 public void easyConstantVarTest() {
   final String e = TelephonyManager.getDeviceId();
   ConnectionManager cm = new ConnectionManager();
   cm.publish(e);
 }
Пример #12
0
 public void easyConstantFieldTest() {
   ConnectionManager cm = new ConnectionManager();
   cm.publish(tainted);
 }