Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a02d9bf9 authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Make sure we don't read from invalid fds

b/4580570

Change-Id: I622f001551a404a7a840d8388a9febac2db107ad
parent 19974ecc
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -130,6 +130,9 @@ static ssize_t MySendReceive(
        int s, void *data, size_t size, int flags, bool sendData) {
    ssize_t result = 0;

    if (s < 0) {
        return -1;
    }
    while (size > 0) {
        fd_set rs, ws, es;
        FD_ZERO(&rs);