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
Fix false ***buffer overflow*** detection
[src/app-framework-binder.git]
/
src
/
afb-api-dbus.c
diff --git
a/src/afb-api-dbus.c
b/src/afb-api-dbus.c
index
a988035
..
17e1eb0
100644
(file)
--- a/
src/afb-api-dbus.c
+++ b/
src/afb-api-dbus.c
@@
-665,7
+665,7
@@
struct origin
struct afb_cred *cred;
/* the origin */
struct afb_cred *cred;
/* the origin */
- char name[
1
];
+ char name[];
};
/* get the credentials for the message */
};
/* get the credentials for the message */
@@
-709,7
+709,7
@@
static struct origin *afb_api_dbus_server_origin_get(struct api_dbus *api, const
}
/* not found, create it */
}
/* not found, create it */
- origin = malloc(strlen(sender) + sizeof *origin);
+ origin = malloc(strlen(sender) +
1 +
sizeof *origin);
if (origin == NULL)
errno = ENOMEM;
else {
if (origin == NULL)
errno = ENOMEM;
else {