diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-07-15 11:01:20 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-11-12 14:00:31 -0800 |
commit | e79417ed7185b150a056d4eb3a1ab528b91d2fc0 (patch) | |
tree | 47c490359d7072258522d75e3bee5a2da8755bc3 /unit | |
parent | 44789fb8d94839d9c2b847d71faa6d649138b128 (diff) | |
download | bluez-e79417ed7185b150a056d4eb3a1ab528b91d2fc0.tar.gz |
sdpd: Fix leaking buffers stored in cstates cache
These buffer shall only be keep in cache for as long as they are
needed so this would cleanup any client cstates in the following
conditions:
- There is no cstate on the response
- No continuation can be found for cstate
- Different request opcode
- Respond with an error
- Client disconnect
Fixes: https://github.com/bluez/bluez/security/advisories/GHSA-3fqg-r8j5-f5xq
Diffstat (limited to 'unit')
-rw-r--r-- | unit/test-sdp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unit/test-sdp.c b/unit/test-sdp.c index d3a885f19..8f95fcb71 100644 --- a/unit/test-sdp.c +++ b/unit/test-sdp.c @@ -235,7 +235,7 @@ static gboolean client_handler(GIOChannel *channel, GIOCondition cond, tester_monitor('>', 0x0000, 0x0001, buf, len); g_assert(len > 0); - g_assert((size_t) len == rsp_pdu->raw_size + rsp_pdu->cont_len); + g_assert_cmpuint(len, ==, rsp_pdu->raw_size + rsp_pdu->cont_len); g_assert(memcmp(buf, rsp_pdu->raw_data, rsp_pdu->raw_size) == 0); |