Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
afb-daemon: Add /tmp has fallback for uploads
[src/app-framework-binder.git]
/
src
/
afb-stub-ws.c
diff --git
a/src/afb-stub-ws.c
b/src/afb-stub-ws.c
index
b362c12
..
3c28871
100644
(file)
--- a/
src/afb-stub-ws.c
+++ b/
src/afb-stub-ws.c
@@
-145,7
+145,7
@@
struct afb_stub_ws
uint8_t is_client;
/* the api name */
uint8_t is_client;
/* the api name */
- char apiname[
1
];
+ char apiname[];
};
static struct afb_proto_ws *afb_stub_ws_create_proto(struct afb_stub_ws *stubws, struct fdev *fdev, uint8_t server);
};
static struct afb_proto_ws *afb_stub_ws_create_proto(struct afb_stub_ws *stubws, struct fdev *fdev, uint8_t server);
@@
-673,7
+673,7
@@
static struct afb_stub_ws *afb_stub_ws_create(struct fdev *fdev, const char *api
{
struct afb_stub_ws *stubws;
{
struct afb_stub_ws *stubws;
- stubws = calloc(1, sizeof *stubws + strlen(apiname));
+ stubws = calloc(1, sizeof *stubws +
1 +
strlen(apiname));
if (stubws == NULL)
errno = ENOMEM;
else {
if (stubws == NULL)
errno = ENOMEM;
else {