Commit Graph

40 Commits

Author SHA1 Message Date
Carsten Haitzler f4ff12406c embryo - embryo_cc - silence some new gcc warnings
lets us focus on real errors in warnings if we have silence
2021-05-26 04:33:54 +01:00
Shinwoo Kim bab3f870b8 embryo_cc: ++safty code
Summary:
This patch is increasing safty code by handling following case.

sc_compile > OH!! there is uninitialized loacal variable "outfname"!! >
setopt > about > longjmp > setjmp returns 3 > goto cleanup >

then uninitialized data is read from local variable "outfname".

Reviewers: raster, Hermet, jsuya, herb

Reviewed By: jsuya

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12074
2020-08-05 14:53:35 +09:00
Youngbok Shin 5af8301bad embryo: fix a integer(cell) overflow problem
Summary:
The most of functions for embryo based on cell(int) types.
addvariable(), defsymbol(), modstk() and etc.
Because of this, if embryo script has a really big(INT_MAX / 4) stack variable,
integer overflow problem has been happened.
@fix

Test Plan:
Put a script in your EDC like the following code.
Build it and try to access the variable.
Or check the writen HEX value by embryo_cc.

script {
   // It's size is 1,000,000,000.
   // Remember, INT_MAX is 2,147,483,647.
   new my_big_variable[1000000000];
   ...
}

Reviewers: cedric, woohyun, raster, eunue, SanghyeonLee

Reviewed By: eunue, SanghyeonLee

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12081
2020-08-04 14:48:02 +09:00
Elyes HAOUAS 09a7dadbac Get rid of trailing whitespace (1 / 14)
Remove trailing whitespace
Differential Revision: https://phab.enlightenment.org/D11999
2020-06-23 10:25:57 +02:00
Mike Blumenkrantz 7b93d492d6 embryo: don't use sizeof() when strlen() is intended
Summary: CID 1402617

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10411
2019-10-18 13:29:20 -04:00
Vincent Torri a5267d3d9c remove Evil.h when not necessary, include evil_private.h when necessary
Test Plan: compilation

Reviewers: zmike, raster, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8925
2019-05-20 09:10:00 -04:00
Marcel Hollerbach 64d6718734 embryo:use new bs static lib 2018-02-17 21:17:58 +01:00
Vincent Torri 0cdd501246 EFL For WIN32: Replace HAVE_EVIL define with _WIN32 2017-09-22 05:06:10 -05:00
Carsten Haitzler 132c047c4d embryo_cc - be sensible about realloc returns so analysers are happy
assingto tmp var then assign to real one after a check to analysers
dont complain.
2017-07-24 13:46:30 +09:00
Gustavo Sverzut Barbieri 8dc853f230 ifdef RUN_IN_TREE logic.
This logic is only needed for autotools, cmake will replicate the
installation file structure and thus eina_prefix works out of box.
2017-02-03 12:36:38 -02:00
Carsten Haitzler 15e34ffe15 embryo_cc - fix coverity complaint about assert
fix assert using a strance assert syntax and go back to basic asserts.
fix coverity CID 1361224

@fix
2016-08-06 15:41:02 +09:00
Jean-Philippe Andre 3d16cdc67e embro_cc: Shut up some coverity warning
CID 1039677 1039678 1039679

The expression's value does not depend on the operands; often,
this represents an inadvertent logic error.

In doarg: An operation with non-constant operands that
computes a result with constant value (CWE-569)

cell is defined as an int, not a long, so it can't be > INT_MAX.
2016-07-13 13:19:01 +09:00
Umesh Tanwar 9986ac387e 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
2016-07-11 18:11:19 +09:00
Vincent Torri 4f242fb48a efl: add binary mode to fdopen() calls
This allows better compatibility with Windows

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-05 21:05:23 +01:00
Jean-Philippe Andre e550b37453 Embryo: Use strncpy instead of strcpy in a few places
There are still lots of unsafe uses of strcpy, strcat, etc...
Dunno if they are relevant though. Also, assert() may be
compiled out at build time (release mode) so don't rely on it
for safety.

Fixes CID 1039593
2014-10-28 10:54:51 +09:00
Carsten Haitzler 0b7e3cf422 embryo_cc - fix possible buffer overrun
fix CID 1039594
2014-09-01 19:40:47 +09:00
Carsten Haitzler d78703d0a8 embryo_cc - fix possible buffer overrun
fix CID 1039593
2014-09-01 19:40:47 +09:00
Carsten Haitzler f440626cf0 embryo_cc - fix possible buffer overrun
fix CID 1039592
2014-09-01 19:40:46 +09:00
Carsten Haitzler 435a0dda37 embryo_cc - fix possible buffer overrun
fix CID 1039591
2014-09-01 19:40:46 +09:00
Carsten Haitzler 88fda07299 embryo_cc - fix possible buffer overrun
fix CID 1039590
2014-09-01 19:40:46 +09:00
Carsten Haitzler 09648f6cf1 embryo_cc - fix possible buffer overrun
fix CID 1039589
2014-09-01 19:40:46 +09:00
Carsten Haitzler 9415a1d310 embryo_cc - fix usless array check
fix CID 1039346
2014-08-22 20:14:58 +09:00
Carsten Haitzler bcbe9f621e embryo_cc - check return value
this matches the check for fgetpos()
2014-08-14 19:11:06 +09:00
Carsten Haitzler 4e85b6b57b embryo_cc - fix return value checking
fixes CID 1039712
2014-08-14 19:09:30 +09:00
Carsten Haitzler 1c2da046dc embryo_cc - remove trainling / from path for windows stat so it works 2014-01-23 08:45:44 +09:00
Carsten Haitzler 6991785df9 embryo - embryo_cc - argv parsing MIGHT leave str buf not nul terminated
should fix CID 1039726
2013-12-11 22:50:34 +09:00
Carsten Haitzler f82c77843e embryo - embryo_cc: fix buffer overrun warning
gcc warning was right. it's a pretty smart cookie too.
2013-11-09 10:15:35 +09:00
Daniel Willmann 3e5bd813d3 embryo: Fix a potential buffer overflow (klocwork id 321)
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-08-12 18:32:40 +01:00
Stefan Schmidt f254edbaed embryo: Removed unused variable 2013-03-26 09:36:09 +00:00
Cedric BAIL 6e8fe3b03d embryo: use eina_file_mkstemp. 2013-03-25 18:45:42 +09:00
Daniel Willmann 262f05782b embryo_cc: Fix possible buffer overflow in setconfig()
Need to account for the space of the trailing '/' as well.

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-03-18 12:46:26 +00:00
Henrique Dante de Almeida ca8fc827a3 efl: Fixes to support compiling with CFLAGS=-Werror
This allows compiling with gcc 4.7.2 without errors (using the
default configuration).
2013-02-26 10:55:04 -03:00
Gustavo Sverzut Barbieri 62bca66249 embryo: remove simple -Wshadow errors. Dangerous/uncertain left.
The follow are left:
{{{
bin/embryo/embryo_cc_sc1.c: In function ‘dowhile’:
bin/embryo/embryo_cc_sc1.c:3524:24: warning: declaration of ‘wq’ shadows a global declaration [-Wshadow]
bin/embryo/embryo_cc_sc1.c:115:21: warning: shadowed declaration is here [-Wshadow]
bin/embryo/embryo_cc_sc1.c: In function ‘dodo’:
bin/embryo/embryo_cc_sc1.c:3546:24: warning: declaration of ‘wq’ shadows a global declaration [-Wshadow]
bin/embryo/embryo_cc_sc1.c:115:21: warning: shadowed declaration is here [-Wshadow]
bin/embryo/embryo_cc_sc1.c: In function ‘dofor’:
bin/embryo/embryo_cc_sc1.c:3565:24: warning: declaration of ‘wq’ shadows a global declaration [-Wshadow]
bin/embryo/embryo_cc_sc1.c:115:21: warning: shadowed declaration is here [-Wshadow]
}}}

looking at their code, they say to alloc a local "wq", but then they
call functions such as delwhile() that changes the global... VERY suspicious!!




SVN revision: 82734
2013-01-13 23:54:21 +00:00
Gustavo Sverzut Barbieri f8fde3d560 efl: fix out-of-tree build of examples.
edje and embryo include files are in source dir, not build.

codegen example must have dependency to build in correct order :-/



SVN revision: 82605
2013-01-11 03:57:29 +00:00
Lucas De Marchi db395ef7eb efl: Remove check for unistd.h
* unistd.h: is very useful, very old and very standard.



SVN revision: 82577
2013-01-10 20:25:26 +00:00
Gustavo Sverzut Barbieri 9ea2ce1041 efl: merge edje.
this is still in progress, mostly the multisense stuff is pending.

it seems that when we merge ecore_audio in edje the libremix and
similar are gone, at least from Edje, and will be in ecore_audio
itself (or pulseaudio).

Changes:
 * __UNUSED__ to EINA_UNUSED
 * binaries (epp, embryo_cc, edje_cc) now consider EFL_RUN_IN_TREE and
   will assume the binaries are still not installed, running from
   build tree location (needs more testing, maybe doesn't work with
   srcdir != builddir, still doesn't solve cross compile builds)



SVN revision: 82139
2013-01-04 02:08:14 +00:00
Stefan Schmidt 90b5d6aeb2 Revert "efl/embryo: Keep room for the terminating '\0' we may add to the path."
After consulting with cedric and Sachiel I have to agree that there is no issue.

SVN revision: 80946
2012-12-14 14:25:26 +00:00
Stefan Schmidt 6a5c0eb7cf efl/embryo: Keep room for the terminating '\0' we may add to the path.
If we go with PATH_MAX we could go out of bounds of this array. Not
going to happen that often really but better safe then sorry.

SVN revision: 80940
2012-12-14 13:35:48 +00:00
Carsten Haitzler 66a43d2a7a more warn-- in efl tree.
SVN revision: 79314
2012-11-15 05:19:14 +00:00
Vincent Torri 5bdb5d3763 merge: add embryo
please check and report problems (not cosmetic ones)

someone should update the efl.spec.in file, i don't know that stuff


SVN revision: 78512
2012-10-26 09:01:52 +00:00