From d42cbe858006f08812c7d39dccfa6448a0b7da34 Mon Sep 17 00:00:00 2001 From: Alexandros Antonopoulos Date: Mon, 21 Jan 2013 14:44:28 +0100 Subject: [PATCH] avctp: Fix size of read() for browsing channel callbacks The read() function should attempt to read browsing->imtu bytes and not sizeof(browsing->imtu). --- profiles/audio/avctp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c index 7a59cb10c..e65594d46 100644 --- a/profiles/audio/avctp.c +++ b/profiles/audio/avctp.c @@ -652,7 +652,7 @@ static gboolean session_browsing_cb(GIOChannel *chan, GIOCondition cond, sock = g_io_channel_unix_get_fd(chan); - ret = read(sock, buf, sizeof(browsing->imtu)); + ret = read(sock, buf, browsing->imtu); if (ret <= 0) goto failed; -- 2.47.3