mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-15 07:00:05 -05:00
stream: handle against zero length payload
Don't send empty payloads in pinospay
This commit is contained in:
parent
2d392c7410
commit
ccb93c9652
2 changed files with 15 additions and 11 deletions
|
|
@ -858,13 +858,15 @@ on_socket_condition (GSocket *socket,
|
|||
}
|
||||
priv->buffer.size = need;
|
||||
|
||||
/* read data */
|
||||
len = g_socket_receive (socket,
|
||||
(gchar *)priv->buffer.data + sizeof (PinosStackHeader),
|
||||
hdr->length,
|
||||
NULL,
|
||||
&error);
|
||||
g_assert (len == hdr->length);
|
||||
if (hdr->length > 0) {
|
||||
/* read data */
|
||||
len = g_socket_receive (socket,
|
||||
(gchar *)priv->buffer.data + sizeof (PinosStackHeader),
|
||||
hdr->length,
|
||||
NULL,
|
||||
&error);
|
||||
g_assert (len == hdr->length);
|
||||
}
|
||||
|
||||
/* handle control messages */
|
||||
for (i = 0; i < num_messages; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue