mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
connection: handle truncated control data
We can't recover from truncated control data so return a fatal error that should stop the client. Truncated control data can happen when there are no more fds available, for example. See #1305
This commit is contained in:
parent
8cf2f134b7
commit
adee3d79b9
1 changed files with 2 additions and 0 deletions
|
|
@ -186,6 +186,8 @@ static int refill_buffer(struct pw_protocol_native_connection *conn, struct buff
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
len = recvmsg(conn->fd, &msg, msg.msg_flags);
|
len = recvmsg(conn->fd, &msg, msg.msg_flags);
|
||||||
|
if (msg.msg_flags & MSG_CTRUNC)
|
||||||
|
return -EPROTO;
|
||||||
if (len == 0 && avail != 0)
|
if (len == 0 && avail != 0)
|
||||||
return -EPIPE;
|
return -EPIPE;
|
||||||
else if (len < 0) {
|
else if (len < 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue