embryo_cc: Buffer overflow check.

Summary:
A string is copied to the array '&symbolname[0]' of size 32,
without checking it's length at first at embryo_cc_sc1.c:2101.
So, used assert  to avoid possible overflow.

Signed-off-by: Umesh Tanwar <umesh.tanwar@samsung.com>

Reviewers: Hermet, cedric, raster

Reviewed By: raster

Subscribers: singh.amitesh, jpeg

Differential Revision: https://phab.enlightenment.org/D3602
This commit is contained in:
Umesh Tanwar 2016-07-11 18:08:31 +09:00 committed by Carsten Haitzler (Rasterman)
parent 38554b652a
commit 9986ac387e
1 changed files with 1 additions and 0 deletions

View File

@ -2098,6 +2098,7 @@ funcstub(int native)
error(10); /* illegal function or declaration */
return;
} /* if */
assert(("strcpy: source str size is more than available at destination", sizeof(str) <= sNAMEMAX));
strcpy(symbolname, str);
} /* if */
needtoken('('); /* only functions may be native/forward */