mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
malloc: Assure that THP mode is always null terminated
This commit is contained in:
parent
decf02d382
commit
801deb07f6
1 changed files with 1 additions and 0 deletions
|
@ -61,6 +61,7 @@ __malloc_thp_mode (void)
|
||||||
|
|
||||||
char str[sizeof(mode_always)];
|
char str[sizeof(mode_always)];
|
||||||
ssize_t s = __read_nocancel (fd, str, sizeof (str));
|
ssize_t s = __read_nocancel (fd, str, sizeof (str));
|
||||||
|
str[s] = '\0';
|
||||||
__close_nocancel (fd);
|
__close_nocancel (fd);
|
||||||
|
|
||||||
if (s == sizeof (mode_always) - 1)
|
if (s == sizeof (mode_always) - 1)
|
||||||
|
|
Loading…
Add table
Reference in a new issue