Page MenuHomePhabricator

edje_entry: fix a potentional error of null deref
ClosedPublic

Authored by akanad on Aug 4 2020, 4:16 AM.

Details

Summary

this is a patch to fix a potentional error by null dereferencing.

Diff Detail

Repository
rEFL core/efl
Branch
2
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17211
Build 11480: arc lint + arc unit
akanad created this revision.Aug 4 2020, 4:16 AM
akanad requested review of this revision.Aug 4 2020, 4:16 AM
akanad updated this revision to Diff 30957.Aug 4 2020, 4:31 AM
  • modify commit
akanad updated this revision to Diff 30972.Aug 4 2020, 4:46 AM
akanad edited the summary of this revision. (Show Details)
  • modify phab summary
bu5hm4n requested changes to this revision.Aug 4 2020, 5:19 AM
bu5hm4n added a subscriber: bu5hm4n.

I dont think this is really what you want.

Do you *really* want to have the selector visuals stay on the canvas if there are no ranges ?

This revision now requires changes to proceed.Aug 4 2020, 5:19 AM
akanad added inline comments.Aug 4 2020, 9:46 PM
src/lib/edje/edje_entry.c
1201

I don't actually know about this logic. I just wanted to prevent this line from null point dereferencing. because evas_textblock_cursor_range_geometry_get has a possibility to return null.

is there no chance for the code inside the if-block being executed when 'range' is null.
if there isn't any chance of that, and if you don't mind, could you please let me know about it?

bu5hm4n added inline comments.
src/lib/edje/edje_entry.c
1201

The code from line 1190 to 1198 is removing the old visuals before adding new visuals.
If the result is NULL, we should just delete the old visuals. But should skip the adding of the new, so:
if (range) { } from line 1198 to 1172.

@ali.alzyod Other comments here ?

akanad updated this revision to Diff 31005.Aug 5 2020, 5:46 PM
  • rebase
  • narrow down some condition
ali.alzyod added inline comments.Aug 5 2020, 11:00 PM
src/lib/edje/edje_entry.c
1201

Seems fine to me

bu5hm4n accepted this revision.Aug 6 2020, 1:33 AM

Seems good. Thx.

This revision is now accepted and ready to land.Aug 6 2020, 1:33 AM
Closed by commit rEFL3f4bcd02dc72: edje_entry: fix a potentional error of null deref (authored by WhiskyKiloSq, committed by Marcel Hollerbach <mail@marcel-hollerbach.de>). · Explain WhyAug 6 2020, 1:35 AM
This revision was automatically updated to reflect the committed changes.