mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
Make sure we don't read too much
This commit is contained in:
parent
236ebeeb68
commit
ce98162ed2
2 changed files with 5 additions and 3 deletions
|
|
@ -2708,7 +2708,7 @@ static void do_input(void *data, int fd, uint32_t mask)
|
|||
|
||||
if (mask & SPA_IO_IN) {
|
||||
while (true) {
|
||||
r = read(fd, buf, sizeof(buf));
|
||||
r = read(fd, buf, sizeof(buf)-1);
|
||||
if (r < 0) {
|
||||
if (errno == EAGAIN)
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue