diff options
Diffstat (limited to 'test/asan/TestCases/heap-overflow-large.cc')
-rw-r--r-- | test/asan/TestCases/heap-overflow-large.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/asan/TestCases/heap-overflow-large.cc b/test/asan/TestCases/heap-overflow-large.cc index eb2fcc3220e7..566b1158a5da 100644 --- a/test/asan/TestCases/heap-overflow-large.cc +++ b/test/asan/TestCases/heap-overflow-large.cc @@ -15,9 +15,9 @@ int main(int argc, char *argv[]) { int *x = new int[5]; memset(x, 0, sizeof(x[0]) * 5); int index = atoi(argv[1]); - int res = x[index]; + unsigned res = x[index]; // CHECK: main // CHECK-NOT: CHECK failed delete[] x; - return res ? res : 1; + return (res % 10) + 1; } |