diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-10-11 13:07:59 +0100 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-10-26 15:39:59 +0100 |
commit | 829e179a524f6c67c1b7ed48ebcdcd01e3cbf3d4 (patch) | |
tree | e38af9cd2daa7544f0afd9b92d03ca8df5b15b8a | |
parent | 8a4566d712a70a7e3f33cfdb0590897d84788529 (diff) | |
download | glibc-829e179a524f6c67c1b7ed48ebcdcd01e3cbf3d4.tar.gz glibc-829e179a524f6c67c1b7ed48ebcdcd01e3cbf3d4.tar.xz glibc-829e179a524f6c67c1b7ed48ebcdcd01e3cbf3d4.zip |
Fix elf/tst-tls20 stack OOB access
Off-by-one error found on morello with strict stack bounds.
-rw-r--r-- | elf/tst-tls20.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/elf/tst-tls20.c b/elf/tst-tls20.c index ce4635eeb1..9cebe22a40 100644 --- a/elf/tst-tls20.c +++ b/elf/tst-tls20.c @@ -264,7 +264,7 @@ do_test_dependency (void) xdlclose (moddep); } - for (int n = 1; n <= nmods; n++) + for (int n = 1; n < nmods; n++) if (mods[n] != 0) unload_mod (n); } @@ -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); } |