summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-11 22:23:58 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-11 22:23:58 +0900
commit4329a359dc967d550965edd5139218afe3718347 (patch)
treecf544f5c8461d9478ee4b03febc03e4838d1491a /src
parent52f752f73d592d8673012b119528cde3578678a1 (diff)
edje_cc handle theoretical string overflow (not real) shhh coverity
these strings are internal fixed strings so never bigger than buffer,. but silence coverity to avoid noise. fixes CID 1355588 , 1355589
Diffstat (limited to 'src')
-rw-r--r--src/bin/edje/edje_cc_parse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/edje/edje_cc_parse.c b/src/bin/edje/edje_cc_parse.c
index 4c860b5dba..ea0cc3043b 100644
--- a/src/bin/edje/edje_cc_parse.c
+++ b/src/bin/edje/edje_cc_parse.c
@@ -216,7 +216,8 @@ new_object(void)
216 char buf[512] = { 0, }; 216 char buf[512] = { 0, };
217 char *end; 217 char *end;
218 218
219 strcpy(buf, id); 219 strncpy(buf, id, sizeof(buf) - 1);
220 buf[sizeof(buf) - 1] = 0;
220 end = strrchr(buf, '.'); 221 end = strrchr(buf, '.');
221 if (end) end++; 222 if (end) end++;
222 else end = buf; 223 else end = buf;
@@ -256,7 +257,8 @@ new_statement(void)
256 char buf[512] = { 0, }; 257 char buf[512] = { 0, };
257 char *end; 258 char *end;
258 259
259 strcpy(buf, id); 260 strncpy(buf, id, sizeof(buf) - 1);
261 buf[sizeof(buf) - 1] = 0;
260 end = strrchr(buf, '.'); 262 end = strrchr(buf, '.');
261 if (end) end++; 263 if (end) end++;
262 else end = buf; 264 else end = buf;