diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-11-09 08:07:38 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-11-09 08:07:38 +0000 |
commit | f06c684a33a89ab89e21b7832eb1cd2b6fecac37 (patch) | |
tree | 2b494922cf95c2c2e08de27e6badff4ea11609ce /clang/test/Analysis/array-struct.c | |
parent | 65c0db98ab8fbbc70847e6c88d46abbfec03f52b (diff) | |
download | bcm5719-llvm-f06c684a33a89ab89e21b7832eb1cd2b6fecac37.tar.gz bcm5719-llvm-f06c684a33a89ab89e21b7832eb1cd2b6fecac37.zip |
Add checker for CWE-588: Attempt to Access Child of a Non-structure Pointer.
llvm-svn: 86529
Diffstat (limited to 'clang/test/Analysis/array-struct.c')
-rw-r--r-- | clang/test/Analysis/array-struct.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/Analysis/array-struct.c b/clang/test/Analysis/array-struct.c index 18a6ed50743..1ab67874c6a 100644 --- a/clang/test/Analysis/array-struct.c +++ b/clang/test/Analysis/array-struct.c @@ -153,7 +153,7 @@ struct s3 p[1]; // an ElementRegion of type 'char'. Then load a nonloc::SymbolVal from it and // assigns to 'a'. void f16(struct s3 *p) { - struct s3 a = *((struct s3*) ((char*) &p[0])); + struct s3 a = *((struct s3*) ((char*) &p[0])); // expected-warning{{Casting a non-structure type to a structure type and accessing a field can lead to memory access errors or data corruption.}} } void inv(struct s1 *); |