Commit Graph

165 Commits

Author SHA1 Message Date
Jean-Philippe Andre bd32015dfc Eet: Fail gracefully on invalid input
Consider infinity and NaN as invalid input for
put_float and put_double, since the underlying convert
function can't process them.

This fixes potential errors with incomplete / invalid evas 3d models
2015-12-29 16:19:02 +09:00
Vincent Torri 3b44645363 efl: add binary mode to f(re)open() calls
This allows better compatibility with Windows

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-05 21:04:36 +01:00
Cedric BAIL 6a7257f5a7 eet: improve error message during eet_close. 2015-11-24 14:27:13 -08:00
Vivek Ellur f0c826c415 eet: remove useless assignment in eet cipher and silence warning.
Summary:

Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-22 23:28:09 +01:00
Tom Hacohen 1f881c859a Eet: remove dead variable assignment.
I guess this is what 2a01c4517b was meant to be doing.
2015-11-18 10:11:55 +00:00
Stefan Schmidt 2892e54d88 Revert "eet: removing useless assignment variables."
This reverts commit 2a01c4517b.

Declaring these variable void breaks the build with disabled crypto.

Fixes T2855
2015-11-18 10:26:25 +01:00
Jean-Philippe Andre b54fe3fe61 Edje data: Fix memory leak in nested data descriptors 2015-11-18 11:48:44 +09:00
Srivardhan Hebbar 2a01c4517b eet: removing useless assignment variables.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-31 02:12:06 +01:00
Jean-Philippe Andre 509ee0f275 Evas: Disable TGV save debugging and fix error log
Disable time stats & quality check
Remove an invalid error message (was logged in case of success)
2015-10-29 21:18:32 +09:00
Jean-Philippe Andre 3f264677fb Eet: Another ETC decoding fix
@fix
2015-10-29 21:06:16 +09:00
Jean-Philippe Andre cc5cccc511 Eet: fix decoding of embedded ETC images
Typos, lack of NULL check, excessive sizeof(type) not matching
the object type, no border set, etc... This all lead to a crash
and then no render (with an error message and then without...).

This also simplifies the implicit loading of ETC1 as ETC2 when
supported by the driver.

@fix
2015-10-29 17:58:34 +09:00
Srivardhan Hebbar 71e68dcca6 eet: handling memory leak on realloc fail.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-22 12:25:39 -07:00
Srivardhan Hebbar 80ccf755a6 eet: handling memory leak on realloc fail.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-21 13:51:34 -07:00
Carsten Haitzler a5747f1ab3 eet - be robust about garbage at the end that looks like an idenity
if there is an identity signaure at the end, ONLY check it if it looks
like a real one (correct magic number, cert and sig size fields are
sane etc.). this means eet opens dont fail for files that may have
trailing garbage or padding that is not an eet identity signature.
2015-10-07 17:50:18 +09:00
Carsten Haitzler 7b018a9740 eet - fix signature alignment and position 2015-10-07 15:47:59 +09:00
Amitesh Singh 26eecda458 eet: fix typo in documentation 2015-09-28 21:50:51 +05:30
Carsten Haitzler 0a77262524 eet - improve eet file storage when encoding by aligning data
this forces data when written to be aligned to 8 bytes. this makes
mapping keys directly far better as from now on you can assume all
data is aligned to 8 bytes allowing you, if you want, to use eet files
as caches for raw binary data you mmap directly and just use (not
portable though).

@feat
2015-08-28 12:56:18 +09:00
Cedric BAIL 7b52ecc9b9 eet: remove the need to order the header correctly for Windows. 2015-05-07 09:53:10 +02:00
Cedric BAIL 02bfb82da0 eet: fix interger overflow
CID 1256196
2015-04-25 20:14:26 +02:00
Carsten Haitzler 555f09009a eet - fix emile changes to not leak in eet_cipher/deciper()
coverity spotted a missing binbuf free for the in binbuf created in
CID 1288921 and CID 1288920. this fixes both of these. leak. new.
2015-04-21 11:01:54 +09:00
Jean-Philippe Andre 258dc999ee Emile: Fix memory leak
The binbuf wrappers were never freed.
2015-04-13 14:00:46 +09:00
Cedric BAIL 0e5686de73 eet: remove use of deprecated Eina_Binbuf functions. 2015-03-17 09:58:21 +01:00
Cedric BAIL 90d8932a03 emile: remove binbuf from emile compression functions. 2015-03-17 09:58:20 +01:00
Cedric BAIL a2385e2ebc emile: follow convention for Emile_Compressor_Level. 2015-03-17 09:58:20 +01:00
Cedric BAIL 8f3ec959b9 emile: change the API to allow supporting other cipher in the future. 2015-03-17 09:58:19 +01:00
Cedric BAIL 9e2333d408 eet: use Emile type for encoding. 2015-03-17 09:58:19 +01:00
Cedric BAIL 4095519d65 emile: fix crash when cspaces is left unchanged. 2015-03-17 09:58:19 +01:00
Cedric BAIL 0e7452a9e1 eet: encode lossy image with AGRY88 or GRY8 whenever possible. 2015-03-17 09:58:19 +01:00
Cedric BAIL 580a893d2e eet: refactoring jpeg encoding. 2015-03-17 09:58:19 +01:00
Cedric BAIL 182568f103 eet: handle AGRY88 encoding for JPEG encoded image.
The alpha and the grey being encoded in two separated grey JPEG.
2015-03-17 09:58:19 +01:00
Cedric BAIL ce340ce2fb eet: fix error handling when decoding TGV file format. 2015-03-17 09:58:19 +01:00
Cedric BAIL c221f33428 eet: use Emile to decode jpeg. 2015-03-17 09:58:19 +01:00
Cedric BAIL f9125499f9 eet: use Emile to decode TGV image section. 2015-03-17 09:58:18 +01:00
Cedric BAIL 65248db8d8 eet: use eina_binbuf and emile to manipulate TGV compressed data. 2015-03-17 09:58:18 +01:00
Cedric BAIL 97c703cdaf eet: initialize emile on demand. 2015-03-17 09:58:17 +01:00
Cedric BAIL f9dd639a92 eet: use Emile instead of Zlib and LZ4 directly. 2015-03-17 09:58:17 +01:00
Cedric BAIL a7d7cae0c4 eet: move to use emile for ciphering logic. 2015-03-17 09:58:17 +01:00
Cedric BAIL 2d342c2814 emile: move GNUTLS and OpenSSL initialization logic from Eet to Emile. 2015-03-17 09:58:17 +01:00
Carsten Haitzler b86579bed6 eet - fix endianess break added by cedric a year ago in image decoding
@fix

this fixes T1987 - the commit that broke it was:

commit 18d494489c
Author: Cedric BAIL <cedric.bail@samsung.com>
Date:   Fri Jan 3 16:20:53 2014 +0900

    eet: use eina_swap*() function instead of custom slower one.
2015-02-04 18:04:55 +09:00
Cedric BAIL 686b10df55 eet: add warning about security to be sure people don't use this function in the wrong context. 2015-01-26 15:29:12 +01:00
Cedric BAIL d2b766a51d eet: properly handle failure and success case by not leaking memory.
CID 1265601.
2015-01-21 16:07:07 +01:00
Cedric BAIL b9db9ca2e3 Revert "eet: fix memory leak in eet_cipher"
This reverts commit d25d56758c.

That patch was leading to double. Thanks ami for finding it.
2015-01-19 14:44:13 +01:00
Carsten Haitzler f4ec47522f eet - one place endianess check wasn't explicit - cleaner code if it is
this MAY be a bugfix, but i can't see how after checking the code, but
to keep it conistent and less likely to grow a bug... do this.
2015-01-14 18:17:19 +09:00
Carsten Haitzler 7532dee7bb eet - boyscouting - clean up whitespaces 2015-01-14 18:13:57 +09:00
Carsten Haitzler 7a8f7047ac eet - image decode - fix robustness of image decode from eet file
there are possible security implications by not checking values of
size fields to see if they are within the data range AND are not 0 or
negative. so do this.

@fix
2015-01-14 18:12:42 +09:00
Tom Hacohen 565f2af60f Eee image: fix macros to be surrounded with do while().
Macros should be surrounded with do {} while() statements,
otherwise there can be issues, like the macro not requiring a semicolon
after the statement or etc.

@fix
2015-01-14 08:55:30 +00:00
Chris Michael db53875e0a eet: Remove unused variable
Summary: This just removes an unused variable spotted during compile.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-06 09:05:37 -05:00
Cedric BAIL b61e9525d1 eet: refactoring jpeg encoding. 2015-01-06 11:51:58 +01:00
Cedric BAIL 6724bbf8bd eet: refactorize handling of endian. 2015-01-06 11:49:28 +01:00
Cedric BAIL 18d494489c eet: use eina_swap*() function instead of custom slower one. 2015-01-06 11:48:25 +01:00