aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2022-10-11 13:07:59 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2022-10-12 12:54:07 +0100
commit37cfa707b08a6d8c060d7fdebf2cc255e1de8908 (patch)
tree1b541c38bb82b7e8be2ab00572cc58526c69bff8 /elf
parent00f9cd1a70c35304b4fb4b6dbcdf2f78228c912b (diff)
downloadglibc-37cfa707b08a6d8c060d7fdebf2cc255e1de8908.zip
glibc-37cfa707b08a6d8c060d7fdebf2cc255e1de8908.tar.gz
glibc-37cfa707b08a6d8c060d7fdebf2cc255e1de8908.tar.bz2
Fix elf/tst-tls20 stack OOB access
Off-by-one error found on morello with strict stack bounds.
Diffstat (limited to 'elf')
-rw-r--r--elf/tst-tls20.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/elf/tst-tls20.c b/elf/tst-tls20.c
index ce4635e..3e94590 100644
--- a/elf/tst-tls20.c
+++ b/elf/tst-tls20.c
@@ -342,7 +342,7 @@ do_test_invalid_dependency (bool bind_now)
xdlclose (moddep);
}
- for (int n = 1; n <= nmods; n++)
+ for (int n = 1; n < nmods; n++)
if (mods[n] != 0)
unload_mod (n);
}