Fix elf/tst-tls20 stack OOB access

Off-by-one error found on morello with strict stack bounds.
This commit is contained in:
Szabolcs Nagy 2022-10-11 13:07:59 +01:00
parent 8a4566d712
commit 829e179a52

View File

@ -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);
}