summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-06-08 12:01:38 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-06-08 12:01:38 +0900
commitd3420cd35c692a808c0a626c8e54a0c85af3a4d4 (patch)
tree396c1013510d381566a4647ceae3abccda183185
parentb9b0177d5e0f2b3a03f77e04c64de534b2c786ac (diff)
downloadefl-d3420cd35c692a808c0a626c8e54a0c85af3a4d4.tar.gz
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
-rw-r--r--src/bin/edje/edje_cc_parse.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bin/edje/edje_cc_parse.c b/src/bin/edje/edje_cc_parse.c
index eb3d02ccb1..9592994735 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)
{