Hello
Here is code snippet -
int global_array[101] = {-1};
char g[101] = {-2};
int main(int argc, char **argv) {
global_array[atoi(argv[1])] = 70;
g[atoi(argv[1])] = 'c';
}
If I compile it with clang , address sanitizer and no other flags used then
for input as "101" it gives ASAN buffer overflow message but input as "200"
does not show any buffer overflow why ?
Aayushi
--
You received this message because you are subscribed to the Google Groups
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.