// return value, ptr arguments.
int atoi(const char *nptr);
-// TODO: Add support for atol and atoll.
long atol(const char *nptr);
long long atoll(const char *nptr);
scanf("%s", s);
int d = atoi(s); // expected-warning + {{tainted}}
int td = d; // expected-warning + {{tainted}}
+
+ // TODO: We shouldn't have to redefine the taint source here.
+ char sl[80];
+ scanf("%s", sl);
+ long l = atol(sl); // expected-warning + {{tainted}}
+ int tl = l; // expected-warning + {{tainted}}
+
+ char sll[80];
+ scanf("%s", sll);
+ long long ll = atoll(sll); // expected-warning + {{tainted}}
+ int tll = ll; // expected-warning + {{tainted}}
+
}