From 4ccf324d564a910e95ebdbfb4bb2851078ef4b99 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Tue, 10 May 2011 12:31:14 +0200 Subject: [PATCH] Validate if sending reply succeed in control_cb --- audio/control.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/audio/control.c b/audio/control.c index 17454b9ad..62380079a 100644 --- a/audio/control.c +++ b/audio/control.c @@ -574,6 +574,8 @@ static gboolean control_cb(GIOChannel *chan, GIOCondition cond, avrcp->code = CTYPE_REJECTED; } ret = write(sock, buf, packet_size); + if (ret != packet_size) + goto failed; return TRUE; -- 2.47.3