X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-api-dbus.c;h=f4fd0eba12d55f6654a03381790b65659577d1de;hb=be4e0e2d3855ccbd3b683bfe6cc4c7f9d3254314;hp=52d449f042ecefde2a55d63ba3e6ed56a97ec57c;hpb=06382af9092babedbf56aa1c00b3bd7cb0b86cda;p=src%2Fapp-framework-binder.git diff --git a/src/afb-api-dbus.c b/src/afb-api-dbus.c index 52d449f0..f4fd0eba 100644 --- a/src/afb-api-dbus.c +++ b/src/afb-api-dbus.c @@ -16,6 +16,7 @@ */ #define _GNU_SOURCE +#define NO_PLUGIN_VERBOSE_MACRO #include #include @@ -91,6 +92,10 @@ static struct api_dbus *make_api_dbus_3(int system, const char *path, size_t pat goto error2; } api->api++; + if (!afb_apis_is_valid_api_name(api->api)) { + errno = EINVAL; + goto error2; + } /* the name/interface is copied after the path */ api->name = &api->path[pathlen + 1];