Page MenuHomePhabricator

textblock: Fix crash with filters
Needs ReviewPublic

Authored by jpeg on Tue, Nov 27, 2:10 AM.



A crash could happen on a bad call to free() context_dup() returns a
newly malloc'ed context if passed NULL (this seems dubious to me, why
not calloc?).


Test Plan
Add an empty efl.ui.text object
Set markup text as "<gfx_filter='code'>Hello</>"

Diff Detail

rEFL core/efl
Lint Skipped
Unit Tests Skipped
Build Status
Buildable 8232
Build 7516: arc lint + arc unit
jpeg created this revision.Tue, Nov 27, 2:10 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added:

jpeg requested review of this revision.Tue, Nov 27, 2:10 AM

Cannot reproduce the problem with this code:

_editor = efl_add(EFL_UI_TEXT_CLASS, box);
efl_text_markup_set(_editor, "<gfx_filter='code'>Hello</>");
efl_pack(box, _editor);

It keeps spewing this line on the console, but no crash:

WRN<60318>: lib/evas/canvas/evas_object_textblock.c:14100 evas_object_textblock_render() Filter 'code' not found on this object