aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-07-16 08:32:05 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-07-16 08:32:37 -0300
commit881b68e45c3a518319dcf5a3c4a2b3ec59e1c1e5 (patch)
tree43f349762e51e4f535258d69b38344aac43dac04 /elf
parent3a0253ac6f5c0caf5324077673b936e917ca8b0f (diff)
downloadglibc-881b68e45c3a518319dcf5a3c4a2b3ec59e1c1e5.zip
glibc-881b68e45c3a518319dcf5a3c4a2b3ec59e1c1e5.tar.gz
glibc-881b68e45c3a518319dcf5a3c4a2b3ec59e1c1e5.tar.bz2
elf: Fix a wrong array access on tst-tls20
Check on x86_64-linux-gnu with --enable-stack-protector=all.
Diffstat (limited to 'elf')
-rw-r--r--elf/tst-tls20.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/elf/tst-tls20.c b/elf/tst-tls20.c
index d8d04fe..831c333 100644
--- a/elf/tst-tls20.c
+++ b/elf/tst-tls20.c
@@ -226,12 +226,12 @@ do_test_dependency (void)
int mods[nmods];
/* We use '0' as indication for a gap, to avoid the dlclose on iteration
cleanup. */
- for (int n = 1; n <= nmods; n++)
+ for (int n = 1; n < nmods; n++)
{
load_mod (n);
mods[n] = n;
}
- for (int n = 1; n <= nmods; n++)
+ for (int n = 1; n < nmods; n++)
{
if (!is_mod_set (g, n))
{
@@ -304,12 +304,12 @@ do_test_invalid_dependency (bool bind_now)
int mods[nmods];
/* We use '0' as indication for a gap, to avoid the dlclose on iteration
cleanup. */
- for (int n = 1; n <= nmods; n++)
+ for (int n = 1; n < nmods; n++)
{
load_mod (n);
mods[n] = n;
}
- for (int n = 1; n <= nmods; n++)
+ for (int n = 1; n < nmods; n++)
{
if (!is_mod_set (g, n))
{