From: Carsten Haitzler (Rasterman) Date: Thu, 8 Jun 2017 03:01:38 +0000 (+0900) Subject: edje_cc handle line too long for buffers X-Git-Tag: upstream/1.20.0~732 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d3420cd35c692a808c0a626c8e54a0c85af3a4d4;p=platform%2Fupstream%2Fefl.git edje_cc handle line too long for buffers if a line from the cpp processor is too long (more than 4k) then abort compilation as something is wrong asnd our buffers can't handle it anyway. @fix --- diff --git a/src/bin/edje/edje_cc_parse.c b/src/bin/edje/edje_cc_parse.c index eb3d02c..9592994 100644 --- a/src/bin/edje/edje_cc_parse.c +++ b/src/bin/edje/edje_cc_parse.c @@ -388,6 +388,12 @@ next_token(char *p, char *end, char **new_p, int *delim) tmpstr = alloca(l + 1); strncpy(tmpstr, p, l); tmpstr[l] = 0; + if (l >= sizeof(fl)) + { + ERR("Line too long: %i chars: %s", l, tmpstr); + err_show(); + exit(-1); + } l = sscanf(tmpstr, "%*s %i \"%[^\"]\"", &nm, fl); if (l == 2) {