Make sure we don't read too much

This commit is contained in:
Wim Taymans 2020-05-20 13:59:55 +02:00
parent 236ebeeb68
commit ce98162ed2
2 changed files with 5 additions and 3 deletions

View file

@ -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;