eet: fix possible wrong size decoding for simple type.

SVN revision: 73923
This commit is contained in:
Cedric BAIL 2012-07-16 10:58:30 +00:00
parent ecffd3ae2f
commit 48cd6930f1
3 changed files with 4 additions and 2 deletions

View File

@ -606,3 +606,4 @@
2012-07-16 Cedric Bail
* Add code to detect overrun and underrun in eet_data_descriptor_element_add.
* Fix possible wrong size decoding for simple type.

View File

@ -11,6 +11,7 @@ Fixes:
* Make eet_dictionary thread safe.
* Check that gnutls and openssl don't return below zero size during decipher.
* Fix crash when cyphering huge amount of data.
* Possible wrong size decoding of simple type.
Eet 1.6.0

View File

@ -3698,7 +3698,7 @@ eet_data_get_array(Eet_Free_Context *context,
if (ede)
{
if (IS_POINTER_TYPE(type))
subsize = eet_basic_codec[ede->type].size;
subsize = eet_basic_codec[ede->type - 1].size;
else
subsize = ede->subtype->size;
@ -4417,7 +4417,7 @@ eet_data_put_array(Eet_Dictionary *ed,
eet_data_encode(ed, ds, data, ede->name, size, ede->type, ede->group_type);
if (IS_POINTER_TYPE(ede->type))
subsize = eet_basic_codec[ede->type].size;
subsize = eet_basic_codec[ede->type - 1].size;
else
subsize = ede->subtype->size;