diff options
author | Peter Wu <lekensteyn@gmail.com> | 2011-12-06 16:13:18 +0000 |
---|---|---|
committer | Peter Wu <lekensteyn@gmail.com> | 2011-12-06 16:13:18 +0000 |
commit | 6e8c92a69c6f7abe88d98e729e06bca6ccf17d72 (patch) | |
tree | 2b3ecc0db0e2b020fabdd5c8ba628615cf4080ea /tests | |
parent | 96333bbb306f7141dee99dc01a9afff8bc7b114b (diff) | |
download | pp2cc-6e8c92a69c6f7abe88d98e729e06bca6ccf17d72.tar.gz |
Fix stack corruption when using arguments (param access off by one)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/params.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/params.c b/tests/params.c index eb91b83..2232fdd 100644 --- a/tests/params.c +++ b/tests/params.c @@ -1,5 +1,7 @@ int square(int x) { - return x * x; + int res; + res = x * x; + return res; } int main() { int x; |