mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
malloc: Assure that THP mode read do write OOB end of stringt
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user