summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUmesh Tanwar <umesh.tanwar@samsung.com>2016-07-11 18:08:31 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-11 18:11:19 +0900
commit9986ac387ec29d79bf0f2dd6f3cade4cdca84fa5 (patch)
tree9ce18bd48efc8f5ee9ac7c830e38c4730337af0e
parent38554b652a14f5a089a3384e61f2fa6d05ceebcb (diff)
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
-rw-r--r--src/bin/embryo/embryo_cc_sc1.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bin/embryo/embryo_cc_sc1.c b/src/bin/embryo/embryo_cc_sc1.c
index b5d0c4f698..b53693495e 100644
--- a/src/bin/embryo/embryo_cc_sc1.c
+++ b/src/bin/embryo/embryo_cc_sc1.c
@@ -2098,6 +2098,7 @@ funcstub(int native)
2098 error(10); /* illegal function or declaration */ 2098 error(10); /* illegal function or declaration */
2099 return; 2099 return;
2100 } /* if */ 2100 } /* if */
2101 assert(("strcpy: source str size is more than available at destination", sizeof(str) <= sNAMEMAX));
2101 strcpy(symbolname, str); 2102 strcpy(symbolname, str);
2102 } /* if */ 2103 } /* if */
2103 needtoken('('); /* only functions may be native/forward */ 2104 needtoken('('); /* only functions may be native/forward */