forked from enlightenment/efl
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
This commit is contained in:
parent
b9b0177d5e
commit
d3420cd35c
|
@ -388,6 +388,12 @@ next_token(char *p, char *end, char **new_p, int *delim)
|
||||||
tmpstr = alloca(l + 1);
|
tmpstr = alloca(l + 1);
|
||||||
strncpy(tmpstr, p, l);
|
strncpy(tmpstr, p, l);
|
||||||
tmpstr[l] = 0;
|
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);
|
l = sscanf(tmpstr, "%*s %i \"%[^\"]\"", &nm, fl);
|
||||||
if (l == 2)
|
if (l == 2)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue