embryo_cc: fix memory overflow in str 62/87862/1
authorWooHyun Jung <wh0705.jung@samsung.com>
Mon, 12 Sep 2016 01:09:32 +0000 (10:09 +0900)
committerWooHyun Jung <wh0705.jung@samsung.com>
Mon, 12 Sep 2016 01:17:00 +0000 (10:17 +0900)
After for-loop i can have value 11. So the str should be longer than 11.

@fix

Change-Id: I63649dc018d08ca1d7a61baaebd8fa098b43dbdd
Signed-off-by: WooHyun Jung <wh0705.jung@samsung.com>
src/bin/embryo/embryo_cc_sc7.c

index 00e0252..db4fa69 100644 (file)
@@ -454,7 +454,7 @@ matchsequence(char *start, char *end, char *pattern,
              char symbols[_maxoptvars][_aliasmax + 1], int *match_length)
 {
    int                 var, i;
-   char                str[_aliasmax + 1];
+   char                str[_aliasmax + 2];
    char               *start_org = start;
 
    *match_length = 0;