backported from upstream to solve memory safety issue
Summary:
The size of Colorclass is 20 bytes, but that of Elm_Color_Overlay 16 bytes.
Currently, there is no code to access last 4 bytes, but it can cause
seg fault by another patch.
Reviewers: cedric, zmike
Differential Revision: https://phab.enlightenment.org/D3784
Change-Id: I2b51a8f352a70968e7a97a128eea24fdab04c40e
Signed-By-Off: Jee-Yong Um <jc9.um@samsung.com>
}
else
{
- cc->current = malloc(sizeof(Elm_Color_Overlay));
+ cc->current = calloc(1, sizeof(Colorclass)); //actually Elm_Color_Overlay
memcpy(cc->current, ecc, sizeof(Elm_Color_Overlay));
cc->current->name = eina_stringshare_ref(ecc->name);
}