mirror of git://sourceware.org/git/glibc.git
malloc: Assure that THP mode read do write OOB end of stringt
This commit is contained in:
parent
801deb07f6
commit
05fe3ecfff
|
|
@ -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…
Reference in New Issue