media: set default value for BAP endpoint Vendor field
authorPauli Virtanen <pav@iki.fi>
Wed, 1 Feb 2023 19:51:47 +0000 (19:51 +0000)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 5 Jan 2024 10:21:48 +0000 (15:51 +0530)
The "Vendor" field is optional, and should have an initialized valid
default value.

It has the default values in register_endpoint, but not in
app_register_endpoint, so make the latter match the former.

profiles/audio/media.c

index 8b8f78e..a1d385d 100644 (file)
@@ -2996,6 +2996,8 @@ static void app_register_endpoint(void *data, void *user_data)
 
        dbus_message_iter_get_basic(&iter, &codec);
 
+       memset(&vendor, 0, sizeof(vendor));
+
        if (g_dbus_proxy_get_property(proxy, "Vendor", &iter)) {
                if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT32)
                        goto fail;