Thread (2 messages) flat view 2 messages, 2 authors, 2019-01-31

Re: [PATCH] avinfo: Fix parsing capabilities

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2019-01-31 10:49:55

Hi Pali,
On Sat, Jan 26, 2019 at 12:25 PM Pali Rohár [off-list ref] wrote:
quoted hunk ↗ jump to hunk
Function print_caps() expects capabilities buffer without AVDTP header.
Previously avinfo somehow worked, because AVDTP header looks like
capability header with unknown category which was skipped.
---
 tools/avinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/avinfo.c b/tools/avinfo.c
index 02fc1f233..a3298e8c8 100644
--- a/tools/avinfo.c
+++ b/tools/avinfo.c
@@ -809,7 +809,7 @@ static ssize_t avdtp_get_caps(int sk, int seid)
                return -1;
        }

-       print_caps(caps, ret);
+       print_caps(caps->caps, ret - sizeof(struct getcap_resp));

        return 0;
 }
--
2.11.0
Applied, thanks.

-- 
Luiz Augusto von Dentz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help