[Pkg-e-commits] [SCM] Enlightenment DR17 file chunk reading/writing library branch, upstream-vcs, updated. 67bc060f7c13fcbcf46c1ecbfdb92e8529574b9b

raster raster at alioth.debian.org
Tue Apr 29 15:56:48 UTC 2008


The following commit has been merged in the upstream-vcs branch:
commit c16e28bbeba5795366e9bf39fed7988de5730585
Author: raster <raster>
Date:   Mon Apr 28 03:04:26 2008 +0000

    fix bug in eet decode of list and hashes of simple types. a bug waiting to
    happen for sure.

diff --git a/ChangeLog b/ChangeLog
index bcddfda..6d491b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
 2008-04-20  Carsten Haitzler (The Rasterman)
 
 	1.0.0 release
+
+2008-04-28  Carsten Haitzler (The Rasterman)
+
+	* Fixed allocation of a list (EET_G_LIST) of simple types
+	(IS_SIMPLE_TYPE) to alloc the correct amount (using the correct type 
+	offset). Also fixed a hash (EET_G_HASH) of simple types too.
+
+
diff --git a/src/lib/eet_data.c b/src/lib/eet_data.c
index 96541f5..33e71fa 100644
--- a/src/lib/eet_data.c
+++ b/src/lib/eet_data.c
@@ -2111,7 +2111,7 @@ _eet_data_descriptor_decode(const Eet_Dictionary *ed,
 				 data_ret = NULL;
 				 if (IS_SIMPLE_TYPE(type))
 				   {
-				      data_ret = calloc(1, eet_coder[type].size);
+				      data_ret = calloc(1, eet_coder[type - 1].size);
 				      if (data_ret)
 					{
 					   _eet_freelist_add(data_ret);
@@ -2171,7 +2171,7 @@ _eet_data_descriptor_decode(const Eet_Dictionary *ed,
 				 if (!echnk.name) goto error;
 				 if (IS_SIMPLE_TYPE(type))
 				   {
-				      data_ret = calloc(1, eet_coder[type].size);
+				      data_ret = calloc(1, eet_coder[type - 1].size);
 				      if (data_ret)
 					{
 					   _eet_freelist_add(data_ret);

-- 
Enlightenment DR17 file chunk reading/writing library



More information about the Pkg-e-commits mailing list