X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-api-dbus.c;h=f4fd0eba12d55f6654a03381790b65659577d1de;hb=be4e0e2d3855ccbd3b683bfe6cc4c7f9d3254314;hp=3a882a56656b4dc8f5fbb352c6019da0a1735db1;hpb=c7e9786d408f13d8f8f43c6b68da916bbb1ed5f3;p=src%2Fapp-framework-binder.git diff --git a/src/afb-api-dbus.c b/src/afb-api-dbus.c index 3a882a56..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 @@ -25,8 +26,8 @@ #include #include -#include "afb-plugin.h" -#include "afb-req-itf.h" +#include +#include #include "afb-common.h" @@ -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];