diff options
Diffstat (limited to 'test/array-out-of-bounds.c')
-rw-r--r-- | test/array-out-of-bounds.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/array-out-of-bounds.c b/test/array-out-of-bounds.c new file mode 100644 index 0000000..1f20c0c --- /dev/null +++ b/test/array-out-of-bounds.c @@ -0,0 +1,9 @@ +int main() { + int x[2] = {1, 2}; + int y[2] = {3, 4}; + x[2] = 0; + int sum = 0; + for(int i=0; i<2; i++) + sum += (x[i] * y[i]); + return sum; +} |