diff options
author | Daniel Willmann <d.willmann@samsung.com> | 2013-03-18 12:21:45 +0000 |
---|---|---|
committer | Daniel Willmann <d.willmann@samsung.com> | 2013-03-18 12:46:26 +0000 |
commit | 262f05782b0c7285960a2e2d2beac9b778ce555f (patch) | |
tree | 613de8d56635797ca427f5de72e16bb534a5b6cb /src/bin | |
parent | 42d320c523c28b896d59e8f1239f7c594286f1a7 (diff) | |
download | efl-262f05782b0c7285960a2e2d2beac9b778ce555f.tar.gz |
embryo_cc: Fix possible buffer overflow in setconfig()
Need to account for the space of the trailing '/' as well.
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/embryo/embryo_cc_sc1.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/embryo/embryo_cc_sc1.c b/src/bin/embryo/embryo_cc_sc1.c index 9fd75092a4..14b6b1cbc1 100644 --- a/src/bin/embryo/embryo_cc_sc1.c +++ b/src/bin/embryo/embryo_cc_sc1.c @@ -683,7 +683,8 @@ setconfig(char *root) * to the list in that case */ *(ptr + 1) = '\0'; - if (strlen(path) < (sizeof(path) - 1 - 7)) + /* Need room for 'include' and DIRSEP_CHAR - so 8 chars - and \0 */ + if (strlen(path) < (sizeof(path) - 1 - 8)) { strcat(path, "include"); } |