From 208d828078d69516f80a8168a8b4146bcc710264 Mon Sep 17 00:00:00 2001 From: cedric Date: Mon, 16 Jul 2012 10:58:30 +0000 Subject: [PATCH] eet: fix possible wrong size decoding for simple type. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eet@73923 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- ChangeLog | 1 + NEWS | 1 + src/lib/eet_data.c | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 18d8ff2..0ce223a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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. diff --git a/NEWS b/NEWS index 6a08a57..456bd18 100644 --- a/NEWS +++ b/NEWS @@ -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 diff --git a/src/lib/eet_data.c b/src/lib/eet_data.c index 1eb822a..bd6bbd9 100644 --- a/src/lib/eet_data.c +++ b/src/lib/eet_data.c @@ -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; -- 2.7.4