/*
- * Copyright (C) 2016, 2017, 2018 "IoT.bzh"
+ * Copyright (C) 2016-2019 "IoT.bzh"
* Author: José Bollo <jose.bollo@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
#include "afb-hsrv.h"
#include "afb-fdev.h"
#include "afb-socket.h"
+
#include "fdev.h"
#include "verbose.h"
#include "locale-root.h"
-
-#include "afb-systemd.h"
+#include "systemd.h"
#include "jobs.h"
#define JSON_CONTENT "application/json"
struct hsrv_itf *next;
struct afb_hsrv *hsrv;
struct fdev *fdev;
- char uri[1];
+ char uri[];
};
struct hsrv_handler {
{
struct hsrv_itf *itf;
- itf = malloc(sizeof *itf + strlen(uri));
+ itf = malloc(sizeof *itf + 1 + strlen(uri));
if (itf == NULL)
return -1;