chg read count arg to one less-than buf size to avoid nul term write past buffer (#531)
This commit is contained in:
Родитель
b71516d3e8
Коммит
f9b180dede
|
@ -93,7 +93,7 @@ int ADUC_LaunchChildProcess(const std::string& command, std::vector<std::string>
|
|||
{
|
||||
char buffer[1024];
|
||||
ssize_t count;
|
||||
count = read(filedes[READ_END], buffer, sizeof(buffer));
|
||||
count = read(filedes[READ_END], buffer, sizeof(buffer) - 1);
|
||||
|
||||
if (count == -1)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче