summaryrefslogtreecommitdiff
path: root/src/bin/embryo
diff options
context:
space:
mode:
authorDaniel Willmann <d.willmann@samsung.com>2013-03-18 12:21:45 +0000
committerDaniel Willmann <d.willmann@samsung.com>2013-03-18 12:46:26 +0000
commit262f05782b0c7285960a2e2d2beac9b778ce555f (patch)
tree613de8d56635797ca427f5de72e16bb534a5b6cb /src/bin/embryo
parent42d320c523c28b896d59e8f1239f7c594286f1a7 (diff)
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/embryo')
-rw-r--r--src/bin/embryo/embryo_cc_sc1.c3
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)
683 * to the list in that case 683 * to the list in that case
684 */ 684 */
685 *(ptr + 1) = '\0'; 685 *(ptr + 1) = '\0';
686 if (strlen(path) < (sizeof(path) - 1 - 7)) 686 /* Need room for 'include' and DIRSEP_CHAR - so 8 chars - and \0 */
687 if (strlen(path) < (sizeof(path) - 1 - 8))
687 { 688 {
688 strcat(path, "include"); 689 strcat(path, "include");
689 } 690 }