All of lore.kernel.org
 help / color / mirror / Atom feed
* [bluez/bluez] b7d71e: a2dp: Fix loading of remote SEP from cache
@ 2026-07-10 17:24 Mikhail
  0 siblings, 0 replies; only message in thread
From: Mikhail @ 2026-07-10 17:24 UTC (permalink / raw)
  To: linux-bluetooth

  Branch: refs/heads/master
  Home:   https://github.com/bluez/bluez
  Commit: b7d71e5067856b0daf2f1f73b3fc95483236610e
      https://github.com/bluez/bluez/commit/b7d71e5067856b0daf2f1f73b3fc95483236610e
  Author: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
  Date:   2026-07-10 (Fri, 10 Jul 2026)

  Changed paths:
    M profiles/audio/a2dp.c

  Log Message:
  -----------
  a2dp: Fix loading of remote SEP from cache

Commit 912f5efb0dd9 ("a2dp: Fix handling of codec capability storage")
added an 'i >= 2' condition to the loop that parses the stored codec
capabilities. Since i starts at 0 the loop body never runs, i stays 0,
and the subsequent 'if (i != size)' check discards every endpoint found
in the cache:

  load_remote_sep() Unable to load LastUsed: rseid 6 not found

With no remote SEP loaded, avdtp_discover() can no longer take the
cached path and issues AVDTP Discover/Get All Capabilities on every
reconnect, and a2dp_setup_remote_path() returns NULL so the transport
ends up at /org/bluez/hciX/dev_YY/fd0 instead of .../sepN/fd0.

The condition was presumably meant to bound the writes into data[128],
which the original commit did not actually fix: caps is read with
'%512s' so size / 2 can be up to 256. Validate size up front instead.

Fixes: https://github.com/bluez/bluez/issues/2285



To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-10 17:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-10 17:24 [bluez/bluez] b7d71e: a2dp: Fix loading of remote SEP from cache Mikhail

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.