From: hadess <noreply@github.com>
To: linux-bluetooth@vger.kernel.org
Subject: [bluez/bluez] 5c3408: shared/shell: Fix crash on bluetoothctl command co...
Date: Thu, 19 Mar 2026 07:15:33 -0700 [thread overview]
Message-ID: <bluez/bluez/push/refs/heads/1069297/000000-5c3408@github.com> (raw)
Branch: refs/heads/1069297
Home: https://github.com/bluez/bluez
Commit: 5c340857c7e14c9ed7c9bd020425de9eefa88843
https://github.com/bluez/bluez/commit/5c340857c7e14c9ed7c9bd020425de9eefa88843
Author: Bastien Nocera <hadess@hadess.net>
Date: 2026-03-19 (Thu, 19 Mar 2026)
Changed paths:
M src/shared/shell.c
Log Message:
-----------
shared/shell: Fix crash on bluetoothctl command completion
Don't try to complete empty commands, leading to invalid reads and
crashes.
==1430873== Invalid read of size 1
==1430873== at 0x484BC77: strcmp (vg_replace_strmem.c:941)
==1430873== by 0x435063: menu_completion (shell.c:1126)
==1430873== by 0x4352F0: shell_completion (shell.c:1177)
==1430873== by 0x4A2542B: gen_completion_matches (complete.c:1282)
==1430873== by 0x4A2E9CD: rl_complete_internal (complete.c:2104)
==1430873== by 0x4A257C2: _rl_dispatch_subseq (readline.c:944)
==1430873== by 0x4A26ADF: readline_internal_char (readline.c:693)
==1430873== by 0x4A46CE4: rl_callback_read_char (callback.c:275)
==1430873== by 0x435E54: bt_shell_input_line (shell.c:309)
==1430873== by 0x436A34: watch_callback (io-glib.c:173)
==1430873== by 0x490A322: g_main_dispatch (gmain.c:3565)
==1430873== by 0x490A322: g_main_context_dispatch_unlocked.lto_priv.0 (gmain.c:4425)
==1430873== by 0x4913277: g_main_context_iterate_unlocked.isra.0 (gmain.c:4490)
==1430873== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==1516885== at 0x484A126: rindex (vg_replace_strmem.c:216)
==1516885== by 0x4353AA: submenu_completion (shell.c:1153)
==1516885== by 0x4353AA: shell_completion (shell.c:1187)
==1516885== by 0x4A2542B: gen_completion_matches (complete.c:1282)
==1516885== by 0x4A2E9CD: rl_complete_internal (complete.c:2104)
==1516885== by 0x4A257C2: _rl_dispatch_subseq (readline.c:944)
==1516885== by 0x4A26ADF: readline_internal_char (readline.c:693)
==1516885== by 0x4A46CE4: rl_callback_read_char (callback.c:275)
==1516885== by 0x435E94: bt_shell_input_line (shell.c:309)
==1516885== by 0x436A74: watch_callback (io-glib.c:173)
==1516885== by 0x490A322: g_main_dispatch (gmain.c:3565)
==1516885== by 0x490A322: g_main_context_dispatch_unlocked.lto_priv.0 (gmain.c:4425)
==1516885== by 0x4913277: g_main_context_iterate_unlocked.isra.0 (gmain.c:4490)
==1516885== by 0x491351E: g_main_loop_run (gmain.c:4695)
==1516885== Address 0x0 is not stack'd, malloc'd or (recently) free'd
Reported-by: Wouter <wouter@xesxen.nl>
To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications
reply other threads:[~2026-03-19 14:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bluez/bluez/push/refs/heads/1069297/000000-5c3408@github.com \
--to=noreply@github.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox