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