eo - parser - fix warning about truncated strings with snprintf
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Tue, 6 Nov 2018 16:07:28 +0000 (16:07 +0000)
committerSangHyeon Jade Lee <sh10233.lee@samsung.com>
Tue, 20 Nov 2018 06:56:20 +0000 (15:56 +0900)
expand buffer to never truncate.

src/lib/eolian/eo_parser.c

index 8ca0702..c8b7f14 100644 (file)
@@ -30,7 +30,7 @@
 static void
 error_expected(Eo_Lexer *ls, int token)
 {
-   char  buf[256];
+   char  buf[256 + 128];
    char tbuf[256];
    eo_lexer_token_to_str(token, tbuf);
    snprintf(buf, sizeof(buf), "'%s' expected", tbuf);