diff mbox series

[BlueZ] client/gatt: gatt_register_app: fix parsing of UUIDs

Message ID 20220923143331.18926-1-ceggers@arri.de (mailing list archive)
State Superseded
Headers show
Series [BlueZ] client/gatt: gatt_register_app: fix parsing of UUIDs | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS
tedd_an/setupell success Setup ELL PASS
tedd_an/buildprep success Build Prep PASS
tedd_an/build success Build Configuration PASS
tedd_an/makecheck success Make Check PASS
tedd_an/makecheckvalgrind success Make Check PASS
tedd_an/makedistcheck success Make Distcheck PASS
tedd_an/build_extell success Build External ELL PASS
tedd_an/build_extell_make success Build Make with External ELL PASS
tedd_an/scan_build success Pass

Commit Message

Christian Eggers Sept. 23, 2022, 2:33 p.m. UTC
- argv[0] (shell command) must not be used as UUID argument
- fixed linked list iteration
---
 client/gatt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

bluez.test.bot@gmail.com Sept. 23, 2022, 3:21 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=679905

---Test result---

Test Summary:
CheckPatch                    PASS      0.69 seconds
GitLint                       PASS      0.50 seconds
Prep - Setup ELL              PASS      32.17 seconds
Build - Prep                  PASS      0.69 seconds
Build - Configure             PASS      10.18 seconds
Build - Make                  PASS      998.60 seconds
Make Check                    PASS      12.85 seconds
Make Check w/Valgrind         PASS      350.79 seconds
Make Distcheck                PASS      292.54 seconds
Build w/ext ELL - Configure   PASS      10.28 seconds
Build w/ext ELL - Make        PASS      102.02 seconds
Incremental Build w/ patches  PASS      0.00 seconds
Scan Build                    PASS      621.25 seconds



---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/client/gatt.c b/client/gatt.c
index c3bdd4710897..e9f505172735 100644
--- a/client/gatt.c
+++ b/client/gatt.c
@@ -1212,7 +1212,7 @@  static gboolean get_uuids(const GDBusPropertyTable *property,
 	dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY,
 				DBUS_TYPE_STRING_AS_STRING, &entry);
 
-	for (uuid = uuids; uuid; uuid = g_list_next(uuid->next))
+	for (uuid = uuids; uuid; uuid = g_list_next(uuid))
 		dbus_message_iter_append_basic(&entry, DBUS_TYPE_STRING,
 							&uuid->data);
 
@@ -1238,7 +1238,7 @@  void gatt_register_app(DBusConnection *conn, GDBusProxy *proxy,
 		return bt_shell_noninteractive_quit(EXIT_FAILURE);
 	}
 
-	for (i = 0; i < argc; i++)
+	for (i = 1; i < argc; i++)
 		uuids = g_list_append(uuids, g_strdup(argv[i]));
 
 	if (uuids) {