[analyzer]How to find ABV on this case using clang static analyzer

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[analyzer]How to find ABV on this case using clang static analyzer

suyash singh via cfe-dev
Hi, 
Thanks Balázs Benics for the reminding to add the [analyzer] tag into the title :)
My question is that:
I want to find the buffer overflow on the following case, but clang static analyzer can't report it out, how should I do?
=========== the case ============
int main(int argc, char **argv)
{
int a[10];
for (int i=0; i<=10; i++) {
a[i]=0;                        <---- array bound over run here
}
}
=========== the case =============
Thanks.


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [analyzer]How to find ABV on this case using clang static analyzer

suyash singh via cfe-dev
Hi, 
Is there anyone who cares this? Isn't the buffer overflow checker able to find it? Or, who can tell me the way to improve it?
Thanks
 
Date: 2020-02-22 19:27
Subject: [cfe-dev] [analyzer]How to find ABV on this case using clang static analyzer
Hi, 
My question is that:
I want to find the buffer overflow on the following case, but clang static analyzer can't report it out, how should I do?
=========== the case ============
int main(int argc, char **argv)
{
int a[10];
for (int i=0; i<=10; i++) {
a[i]=0;                        <---- array bound over run here
}
}
=========== the case =============
Thanks.


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev