mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
Fix off-by-one OOB read in elf/tst-tls20
The int mods[nmods] array on the stack was overread by one. Reviewed-by: Florian Weimer <fweimer@redhat.com>
This commit is contained in:
parent
eef17d4d9f
commit
6a3794ea91
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user