mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
malloc: Assure that THP mode read do write OOB end of stringt
This commit is contained in:
parent
801deb07f6
commit
05fe3ecfff
1 changed files with 2 additions and 0 deletions
|
@ -61,6 +61,8 @@ __malloc_thp_mode (void)
|
|||
|
||||
char str[sizeof(mode_always)];
|
||||
ssize_t s = __read_nocancel (fd, str, sizeof (str));
|
||||
if (s >= sizeof str || s < 0)
|
||||
return malloc_thp_mode_not_supported;
|
||||
str[s] = '\0';
|
||||
__close_nocancel (fd);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue