From 43c2d747a314248dbcff42b3c2f563e326437ca6 Mon Sep 17 00:00:00 2001 From: Frederic Martinsons Date: Sun, 24 Jan 2021 16:46:14 +0100 Subject: [PATCH] Check object path validity during completion inside print_paths. Closes #344 Signed-off-by: Frederic Martinsons --- gio/gdbus-tool.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gio/gdbus-tool.c b/gio/gdbus-tool.c index 78198df00..5cb80b45f 100644 --- a/gio/gdbus-tool.c +++ b/gio/gdbus-tool.c @@ -250,6 +250,11 @@ print_paths (GDBusConnection *c, g_printerr (_("Error: %s is not a valid name\n"), name); goto out; } + if (!g_variant_is_object_path (path)) + { + g_printerr (_("Error: %s is not a valid object path\n"), path); + goto out; + } error = NULL; result = g_dbus_connection_call_sync (c,