embryo_cc: fix memory overflow in str
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:09:32 +0000 (10:09 +0900)
After for-loop i can have value 11. So the str should be longer than 11.

@fix

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;