raster pushed a commit to branch master.
commit 36cd49a182f74eff045bd69d1e6ca5dc72865aa6
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date: Tue Jul 16 20:05:52 2013 +0900
fix realloc assign to "self".
---
src/bin/edje/edje_pick.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/bin/edje/edje_pick.c b/src/bin/edje/edje_pick.c
index e1dfb46..3f3b157 100644
--- a/src/bin/edje/edje_pick.c
+++ b/src/bin/edje/edje_pick.c
@@ -484,6 +484,7 @@ _edje_pick_external_dir_update(Edje_File *o, Edje_File *edf)
/* Add external-dir entries */
unsigned int total = 0;
unsigned int base = 0;
+ Edje_External_Directory_Entry *entries;
if (o->external_dir)
base = total = o->external_dir->entries_count;
@@ -492,8 +493,14 @@ _edje_pick_external_dir_update(Edje_File *o, Edje_File
*edf)
total += edf->external_dir->entries_count;
- o->external_dir->entries = realloc(o->external_dir->entries,
- total *
sizeof(Edje_External_Directory_Entry));
+ entries = realloc(o->external_dir->entries,
+ total * sizeof(Edje_External_Directory_Entry));
+ if (!entries)
+ {
+ EINA_LOG_ERR("Out of memory in realloc()");
+ return;
+ }
+ o->external_dir->entries = entries;
memcpy(&o->external_dir->entries[base], edf->external_dir->entries,
edf->external_dir->entries_count *
--
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk