Commit Graph

73 Commits

Author SHA1 Message Date
Carsten Haitzler 26ea0eaac2 embryo - embryo_cc - one more warning bites the dust 2021-05-26 13:50:07 +01:00
Carsten Haitzler 0dab01b44d embryo - embryo_cc - silence some new gcc warnings - try 2
all warnings bar 1 fixed. my manual strncpy seems ot have an issue -
commented out.
2021-05-26 04:42:22 +01:00
Carsten Haitzler e9fcaa7339 Revert "embryo - embryo_cc - silence some new gcc warnings"
This reverts commit f4ff12406c.

hmm - it seems this warning silencing didn't work. revisit...
2021-05-26 04:40:09 +01:00
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
Xavi Artigas c55299ca51 docs: Fix assorted typos in legacy documentation
Samsung reported a long list of typos in our legacy docs, this fixes them.
2019-01-28 13:14:20 +01:00
Marcel Hollerbach e43f090265 cmake: remove!
This build was never complete and also was not maintained probebly.

It is also dropped in favour of meson which is cool, merged, works & is fast.

Differential Revision: https://phab.enlightenment.org/D7010
2018-12-20 20:07:26 +01:00
Carsten Haitzler c76ea749c1 embryo_cc - warn - bigger buffer to avoid truncation warning 2018-11-09 11:44:00 +00:00
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
Marcel Hollerbach 64d6718734 embryo:use new bs static lib 2018-02-17 21:17:58 +01:00
Vincent Torri 4ae6eeb2cf efl: remove _MSC_VER (Visual Studio macro) usage in source code 2018-01-04 12:59:47 -08:00
Vincent Torri 0cdd501246 EFL For WIN32: Replace HAVE_EVIL define with _WIN32 2017-09-22 05:06:10 -05:00
Carsten Haitzler 66f71d2ebc embryo_cc - remove pointless test for null byte and space
space wins. the nul byte test is pointless. not a bug but pointless code

found by PVS studio
2017-07-29 11:36:33 +09: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
Gustavo Sverzut Barbieri a87ba1d6ad cmake: add embryo. 2017-01-26 16:36:21 -02:00
JEONGHYUN YUN 078c4a9f11 embryo : Prevent buffer overflow in embryo_cc_sc2
Reviewers: jypark

Reviewed By: jypark

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4304
2016-09-20 15:31:16 +08:30
WooHyun Jung 98229bc5d6 embryo_cc: fix memory overflow in str
After for-loop i can have value 11. So the str should be longer than 11.

@fix
2016-09-12 10:09:32 +09: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
jiin.moon 4cb4a8c70a embryo_cc: prevent memory curruption
Summary:
modified codes according to prevent result,
@fix

Reviewers: Jaehyun, Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2564

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-27 00:31:06 +02:00
woochan lee 648ccd3155 embryo_cc_sc2.c: prevent memory corruption.
Summary:
Modified code to following coverity result.
(overflow the memory access.)

@fix

Reviewers: raster, Hermet

Reviewed By: Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1893
2015-01-29 01:32:16 +09:00
woochan lee 1900e7785f embryo: prevent useless assignment.
Summary: In the if case 's1[]19 = 0' state looks meaningless.

Reviewers: raster, Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1895

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-01-26 12:14:25 +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 0040e00373 embryo_cc - fix symbol write
this fixes an actual bug coverity found in embryo_cc

fix CID 1039650
2014-09-01 19:40:47 +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 1f5aa3050b embryo_cc - fix possible buffer overrun
fix CID 1039588
2014-09-01 19:40:46 +09:00
Carsten Haitzler ea3d28d0c3 embryo_cc - fix possible buffer overrun
fix CID 1039587
2014-09-01 19:40:46 +09:00
Carsten Haitzler 1b74f19b60 embryo_cc - fix buffer overrun possibility
fix CID 1039586
2014-09-01 19:40:46 +09:00
Carsten Haitzler 6d694962c6 embryo_cc - fix coverity buffer complaint
this isnt an actual problem, but best it never comes around again. fix
CID 1039585
2014-09-01 19:40:46 +09:00
Carsten Haitzler 209962f763 embryo_cc - remove useless check against always-there array
fix CID 1039345
2014-08-27 17:08:16 +09:00
Carsten Haitzler 3f97906d70 embryo_cc - fix bunch of unchecked fseeks
this fixes CID 996788
2014-08-27 14:29:21 +09:00
Carsten Haitzler 9415a1d310 embryo_cc - fix usless array check
fix CID 1039346
2014-08-22 20:14:58 +09:00
Carsten Haitzler 14008d3111 embryo_cc - fix uselss array existance check
fix CID 1039345
2014-08-22 20:14:58 +09:00
Carsten Haitzler 32e5189952 embryo_cc - check fseeek return and complain
fixes CID 996788
2014-08-22 20:14:57 +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 2ee14e5997 embryo_cc - make assert clearer
this fixes coverity warning CID 1039730
2014-08-14 18:55:02 +09:00
Carsten Haitzler 970968daab embyro-cc - fix coverity overruun issue
overrun in fatal msg access - fix CID 1039315
2014-08-13 17:14:53 +09:00