// RUN: %clang_cc1  -analyze -analyzer-checker=experimental.security.taint,debug.TaintTest -verify %s

int scanf(const char *restrict format, ...);
int getchar(void);

#define BUFSIZE 10
int Buffer[BUFSIZE];

void bufferScanfAssignment(int x) {
  int n;
  int *addr = &Buffer[0];
  scanf("%d", &n);
  addr += n;// expected-warning {{tainted}}
  *addr = n; // expected-warning {{tainted}}
}

// RUN: %clang_cc1  -analyze -analyzer-checker=experimental.security.taint,debug.TaintTest -verify %s

int scanf(const char *restrict format, ...);
int getchar(void);

#define BUFSIZE 10
int Buffer[BUFSIZE];

void bufferScanfAssignment(int x) {
  int n;
  int *addr = &Buffer[0];
  scanf("%d", &n);
  addr += n;// expected-warning {{tainted}}
  *addr = n; // expected-warning {{tainted}} expected-warning {{tainted}}
}

Add a missing taint tester warning.
[analyzer] Add a missing taint tester warning.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@145834 91177308-0d34-0410-b5e6-96231b3b80d8
