Page MenuHomePhabricator

gl: remove invalid read and write
ClosedPublic

Authored by kimcinoo on Jan 13 2021, 7:56 PM.

Details

Summary

There could be 2 evas_gl_image referencing 1 evas_gl_texture.
evas_object_image_orient_set could make this case.
In this case, when one evas_gl_image is removed(free), the evas_gl_texture
is not removed because its reference count.
After this point, if the other evas_gl_image is removed without drawing
(see function evas_gl_common_image_draw, line "im->tex->im = im")
then evas_gl_texture is reading invalid adress when it is removed.

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kimcinoo created this revision.Jan 13 2021, 7:56 PM
kimcinoo requested review of this revision.Jan 13 2021, 7:56 PM
devilhorns accepted this revision.EditedJan 13 2021, 8:31 PM
devilhorns added a subscriber: devilhorns.

+1. Please Commit. Approved !

Code read Clean and is an Improvement...

I like that it does Test now for the free...

I like it Hermet.....

This revision is now accepted and ready to land.Jan 13 2021, 8:31 PM
This revision was automatically updated to reflect the committed changes.