forked from enlightenment/efl
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
This commit is contained in:
parent
52f752f73d
commit
4329a359dc
|
@ -216,7 +216,8 @@ new_object(void)
|
|||
char buf[512] = { 0, };
|
||||
char *end;
|
||||
|
||||
strcpy(buf, id);
|
||||
strncpy(buf, id, sizeof(buf) - 1);
|
||||
buf[sizeof(buf) - 1] = 0;
|
||||
end = strrchr(buf, '.');
|
||||
if (end) end++;
|
||||
else end = buf;
|
||||
|
@ -256,7 +257,8 @@ new_statement(void)
|
|||
char buf[512] = { 0, };
|
||||
char *end;
|
||||
|
||||
strcpy(buf, id);
|
||||
strncpy(buf, id, sizeof(buf) - 1);
|
||||
buf[sizeof(buf) - 1] = 0;
|
||||
end = strrchr(buf, '.');
|
||||
if (end) end++;
|
||||
else end = buf;
|
||||
|
|
Loading…
Reference in New Issue