diff options
author | 2015-06-18 20:01:47 +0000 | |
---|---|---|
committer | 2015-06-18 20:01:47 +0000 | |
commit | 5b49fdef5fba0304ba7ce13973408b376b62a5c8 (patch) | |
tree | 836ccd3beb0b09197a22024b71b7430325360901 | |
parent | spelling fixes from theo buehler; (diff) | |
download | wireguard-openbsd-5b49fdef5fba0304ba7ce13973408b376b62a5c8.tar.xz wireguard-openbsd-5b49fdef5fba0304ba7ce13973408b376b62a5c8.zip |
Fix stack shuffle such that sj includes si and the last element actually
gets a chance to be reordered.
-rw-r--r-- | gnu/gcc/gcc/cfgexpand.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/gcc/gcc/cfgexpand.c b/gnu/gcc/gcc/cfgexpand.c index d69855dbeb6..17aff165f6d 100644 --- a/gnu/gcc/gcc/cfgexpand.c +++ b/gnu/gcc/gcc/cfgexpand.c @@ -438,7 +438,7 @@ partition_stack_vars (void) for (si = n - 1; si > 0; si--) { size_t tmp; - sj = arc4random_uniform(si); + sj = arc4random_uniform(si + 1); tmp = stack_vars_sorted[si]; stack_vars_sorted[si] = stack_vars_sorted[sj]; |